Skip to content

Commit ac12a58

Browse files
committed
Prevent others domain/sub-domain have access to the cookie session
1 parent 27cabb6 commit ac12a58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/SessionRetriever.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function retrieve(): array
4646
ini_set('session.cookie_domain', $this->domain);
4747
ini_set('session.cookie_secure', (string) $this->secure);
4848
ini_set('session.cookie_httponly', '1');
49+
ini_set('session.cookie_samesite', 'Lax');
4950

5051
// When AWS Elasticache DNS resolution fails, PHP throws an error
5152
// session_start(): php_network_getaddresses: getaddrinfo failed: Name or service not known

0 commit comments

Comments
 (0)