Skip to content

Instantly share code, notes, and snippets.

@skoranda
Last active January 6, 2021 12:27
Show Gist options
  • Save skoranda/d4c9a132c50e82db341c433a75e616df to your computer and use it in GitHub Desktop.
Save skoranda/d4c9a132c50e82db341c433a75e616df to your computer and use it in GitHub Desktop.
# 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
@skoranda
Copy link
Author

Thanks. Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment