Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatthes committed Jun 26, 2024
1 parent cfd86fd commit 9444163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/SessionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ function () use ($request, &$newSessionId, &$sessionDataRef, &$loadedSessionId,
null,
null,
$this->cookiePath,
secure: true,
sameSite: $this->sameSite
);
}
Expand All @@ -127,6 +128,7 @@ function () use ($request, &$newSessionId, &$sessionDataRef, &$loadedSessionId,
$newSessionId,
0,
$this->cookiePath,
secure: true,
sameSite: $this->sameSite
);

Expand Down
3 changes: 2 additions & 1 deletion src/Storages/CookieSessionStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public function write(string $sessionId, array $data): void

$cookieOptions = [
'expires' => time() + 3600 * 24, // 1 day
'path' => '/',
'path' => '/',
'httponly' => true,
'samesite' => $this->sameSite // Could be 'None', 'Lax', or 'Strict', depending on your needs
];

Expand Down

0 comments on commit 9444163

Please sign in to comment.