Created
December 6, 2013 11:47
-
-
Save trekawek/7822505 to your computer and use it in GitHub Desktop.
Following Apache configuration snippet separates JSESSIONID cookie for secure and insecure acces.
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
# required modules: | |
# * setenvif | |
# * rewrite | |
# * headers | |
SetEnvIf Https-Header "1" is_https=1 | |
Header edit Set-Cookie JSESSIONID=(.+)$ "JSID_SECURE=$1; secure" env=is_https | |
Header edit Set-Cookie JSESSIONID JSID_HTTP env=!is_https | |
RequestHeader edit Cookie JSID_SECURE JSESSIONID env=is_https | |
RequestHeader edit Cookie JSID_HTTP JSESSIONID env=!is_https |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment