Skip to content

Commit 02bbc9e

Browse files
committed
Set cookie always for root path, not current path
1 parent f4ae166 commit 02bbc9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JwtSession.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function write($session_id, $session_data)
177177
$token = $jwt->generateToken($data);
178178

179179
if (!headers_sent()) {
180-
setcookie(self::COOKIE_PREFIX . $this->suffix, $token, null, null, $this->cookieDomain);
180+
setcookie(self::COOKIE_PREFIX . $this->suffix, $token, null, '/', $this->cookieDomain);
181181
}
182182

183183
return true;

0 commit comments

Comments
 (0)