Last active
January 6, 2021 12:27
-
-
Save skoranda/d4c9a132c50e82db341c433a75e616df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Known incompatible clients. See https://www.chromium.org/updates/same-site/incompatible-clients | |
# | |
# All browsers on iOS 12 | |
BrowserMatch "\(iP.+; CPU .*OS 12[_\d]*.*\) AppleWebKit\/" DO_NOT_EDIT_COOKIE=1 | |
# Safari on MacOS 10.14 | |
BrowserMatch "\(Macintosh;.*Mac OS X 10_14[_\d]*.*\) AppleWebKit\/.*Version\/.* Safari\/" DO_NOT_EDIT_COOKIE=1 | |
# Embedded browsers on MacOS 10.14 | |
BrowserMatch "^Mozilla\/[\.\d]+ \(Macintosh;.*Mac OS X 10_14[_\d]*.*\) .*AppleWebKit\/[\.\d]+ \(KHTML, like Gecko\)$" DO_NOT_EDIT_COOKIE=1 | |
# UCBrowser major versions 8 through 11 | |
BrowserMatch "UCBrowser\/11\.(\d+)\.(\d+)[\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
BrowserMatch "UCBrowser\/10\.(\d+)\.(\d+)[\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
BrowserMatch "UCBrowser\/9\.(\d+)\.(\d+)[\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
BrowserMatch "UCBrowser\/8\.(\d+)\.(\d+)[\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
# UCBrowser major version 12.0.x through 12.13.1 | |
BrowserMatch "UCBrowser\/12\.13\.[0-1][\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
BrowserMatch "UCBrowser\/12\.1[0-2]\.(\d+)[\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
BrowserMatch "UCBrowser\/12\.\d\.(\d+)[\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
# Chrome and Chromium-derviced versions 51 through 66 | |
BrowserMatch "Chrom[^ \/]+\/6[0-6][\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
BrowserMatch "Chrom[^ \/]+\/5[1-9][\.\d]* " DO_NOT_EDIT_COOKIE=1 | |
# Append SameSite=None unless incompatible client | |
Header edit Set-Cookie ^(.*)$ $1;SameSite=None env=!DO_NOT_EDIT_COOKIE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an extra space in the MacOS 10.14 detection - right before "AppleWebKit". As it is written, it requires 2 spaces between the right paren & AppleWebKit.
The regex should be:
"^Mozilla\/[\.\d]+ \(Macintosh;.*Mac OS X 10_14[_\d]*.*\) .*AppleWebKit\/[\.\d]+ \(KHTML, like Gecko\)$"