Forum Moderators: open
Sec-Fetch-Dest:document
Sec-Fetch-User:?1
Sec-Fetch-Mode:navigate
Sec-Fetch-Site:same-origin
Sec-Ch-Ua-Platform:"Android"
Sec-Ch-Ua-Mobile:?1
Sec-Ch-Ua:"Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115" Sec-Fetch-Dest:document
Sec-Fetch-User:?1
Sec-Fetch-Mode:navigate
Sec-Fetch-Site:cross-site
Sec-Ch-Ua-Platform:"macOS"
Sec-Ch-Ua-Mobile:?0
Sec-Ch-Ua:"Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99" Sec-Fetch-Mode:navigate
Sec-Fetch-Dest:document
Sec-Fetch-Site:cross-site Sec-Ch-Ua-Platform:"macOS"
Sec-Gpc:1
Sec-Ch-Ua-Mobile:?0
Sec-Ch-Ua:".Not/A)Brand";v="99", "Google Chrome";v="114", "Chromium";v="114" Sec-Fetch-User:?1
Sec-Fetch-Site:none
Sec-Fetch-Mode:navigate
Sec-Fetch-Dest:document Sec-Gpc:1
Sec-Fetch-User:?1
Sec-Fetch-Site:cross-site
Sec-Fetch-Mode:navigate
Sec-Fetch-Dest:document(note the extra (experimental) Sec-Gpc - an advert blocker) <if " ! (BOT)"> // lots of test for bots
# check for metadata (sec- etc)
<if " %{HTTP:Sec-Fetch-Mode} =~ m#navigate# " > // necessary test to permit non-page items (pics etc)
SetEnvIf ^Sec-Fetch-User$ ^$ metau=no-user
</if>
<if " ( %{HTTP_USER_AGENT} =~ m#Safari# ) && ! ((%{HTTP_USER_AGENT} =~ m#Chrome# ) || (%{HTTP_USER_AGENT} =~ m#Firefox#))">
setenv !metau // remove env if only safari
</if>
SetEnvIf ^Sec-Fetch-Site$ ^cross-site$ metac=cross-site // currently disabled as per above text
</if> <if " (( %{HTTP_USER_AGENT} =~ m#Chrome#) || (%{HTTP_USER_AGENT} =~ m#Firefox#)) && ( %{HTTP:Sec-Fetch-Mode} =~ m#navigate# ) && ! ( %{HTTP:Sec-Fetch-User} =~ m#^$# )" >
SetEnv meta=no-user
</if> some are actually chrome with Safari added to the UAI think all webkit-based browsers include “Safari” in the UA string. Opera tops this by having both “Safari” and “Chrome”--in addition to, not instead of, “OPR”. So you get a sequence like
Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15 User-Agent:Mozilla/5.0 (Linux; Android 9; KFTRWI) AppleWebKit/537.36 (KHTML, like Gecko) Silk/118.1.77 like Chrome/118.0.5993.111 Safari/537.36 Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36(which is quoting an obsolete Safari version (as do most of the chrome ones.)) Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0
"headers": {
"user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
"referer": "https://www.example.com/",
"Sec-Fetch-Mode": "no-cors",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Dest": "image",
} User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15... Safari/605.1 which does not have Sec headers. Sec-Fetch-Dest:document
Sec-Fetch-Mode:navigate
Sec-Fetch-Site:cross-site
Sec-Ch-Ua-Platform:"Android"
Sec-Ch-Ua-Mobile:?1
Sec-Ch-Ua:"Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24" <if " ( (%{HTTP_USER_AGENT} =~ m#Chrome|Firefox# ) && ( %{HTTP:Sec-Fetch-Mode} =~ m#^$|navigate# ) ) && ! ( %{HTTP_USER_AGENT} =~ m#${GoodBotSet}#) ">
SetEnvIf ^Sec-Fetch-User$ ^$ meta=no-user
SetEnvIf ^Sec-Ch-Ua-Mobile$ ^\?1$ !meta
</if> ... where ${GoodBotSet} is a defined variable containing a list of real bots.
Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/120.0 Mobile/15E148 Safari/605.1.15 Mozilla/5.0 (iPad; CPU OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/120.0 Mobile/15E148 Safari/605.1.15 Mozilla/5.0 (iPod touch; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) FxiOS/120.0 Mobile/15E148 Safari/605.1.15
Sec-Ch-Ua:"HeadlessChrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24" In my case if the user hits "refresh", user would already have(must have) session pair of cookie set by our website, so not a big deal.
We use combination/pairs of sec-fetch-dest & sec-fetch-mode on top of that.
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; Mozilla/5.0, Google-AdWords-Express) Chrome/122.0.6261.94 Safari/537.36 Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P; Google-AdWords-Express) AppleWebKit/[WEBKIT_VERSION] (KHTML, like Gecko) Chrome/[CHROME_VERSION] Mobile Safari/[WEBKIT_VERSION]
..With no SEC-Fetch headers coming from Goog 66.249.88/24 range.
[WEBKIT_VERSION]Anything in this form--meaning that the botrunner forgot to fill in the blanks in their script--can safely be blocked :) Mine currently says
BrowserMatch _VERSION bad_agent=noversion
Exact UA coming from Google:Somewhere G### has a list of their user-agents, and the IPs they come from, so poking holes should not be difficult. 66.249.80.0/20 annoys me mightily, because it's such a mix of legitimate and illegitimate (“what do those b######s want now?”) requests. I currently have 66.249.84 blocked unconditionally, though I can’t remember exactly what they did to cause offense. As for 66.249.88, I find a lot of this:
66.249.88.77 - - [16/Apr/2024:08:27:27 -0700] "GET /.well-known/traffic-advice HTTP/1.1" 403 7473 "-" "Chrome Privacy Preserving Prefetch Proxy"whatever the ### that is. Further poking-around tells me they’re blocked for not sending the Language header, not that it matters since they are requesting a non-existent file.