Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set SameSite cookie attribute using Apache configuration?

I am not able to see SameSite=Strict using builtin developer tools in the “Application” tab.

I have added below Header code in Apache configuration

Header always edit Set-Cookie (.*) "$1;SameSite=Strict"
Header edit Set-Cookie ^(.*)$ $1;SameSite=Strict

Please let me know how to set SameSite=Strict using above settings.

like image 263
Abhishek Habbu Avatar asked Nov 28 '22 00:11

Abhishek Habbu


1 Answers

For apache2 >= 2.2.4

Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=Strict

For apache2 lower than 2.2.4

Header set Set-Cookie HttpOnly;Secure;SameSite=Strict
like image 67
DevAb Avatar answered Dec 06 '22 05:12

DevAb