SameSite=None not working for Apache 2.2.15 and Tomcat 6

2.1k Views Asked by At

I have Apache 2.2.15 with tomcat 6, and I am trying to set the following command in Apache:

Header set Set-Cookie HttpOnly;Secure;SameSite=None 

this is not working. I would really appreciate if any advice and help, since then the iFrame capability is broken.

1

There are 1 best solutions below

5
covener On

That command is so far off it's hard to tell what your intent was.

If you're trying to modify a cookie, don't you want Header edit... here? If you're actually trying to set a new cookie, you're missing the cookie name and value.

https://github.com/covener/apache-samesite/blob/master/samesite-global.conf

Header always edit Set-Cookie "^(?!.*(\s+|;)(?i)SameSite=)(.*)" "$0; SameSite=None; Secure" env=!SAMESITE_SKIP
Header onsuccess edit Set-Cookie "^(?!.*(\s+|;)(?i)SameSite=)(.*)" "$0; SameSite=None; Secure" env=!SAMESITE_SKIP
Header always edit Set-Cookie "(.*(\s+|;)(?i)Secure(\s+|;).*) Secure$" "$1" env=!SAMESITE_SKIP
Header onsuccess edit Set-Cookie "(.*(\s+|;)(?i)Secure(\s+|;).*) Secure$" "$1" env=!SAMESITE_SKIP