Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

fix(Session): Send cookie header only when session has been used #14

Merged
merged 1 commit into from Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/PsrApplication.php
Expand Up @@ -68,7 +68,9 @@ public function __construct(
private Session $session,
) {
$this->onResponse[] = function () {
$this->session->sendCookie();
if($this->session->isStarted()){
$this->session->sendCookie();
}
$this->session->close();

if (!$this->httpRequest->getCookie(Helpers::STRICT_COOKIE_NAME)) {
Expand Down