diff options
| author | sillylaird <sillyfanboy@gmail.com> | 2026-09-03 00:33:59 +0000 |
|---|---|---|
| committer | sillylaird <sillyfanboy@gmail.com> | 2026-09-03 00:33:59 +0000 |
| commit | 898b52edcb47bcb3e9d6106e74ca73e74ea01e70 (patch) | |
| tree | 85c6ee5ad58b860144551184d4cf86b560c62b91 /partials/session.php | |
| download | www-898b52edcb47bcb3e9d6106e74ca73e74ea01e70.tar.gz www-898b52edcb47bcb3e9d6106e74ca73e74ea01e70.zip | |
Diffstat (limited to 'partials/session.php')
| -rw-r--r-- | partials/session.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/partials/session.php b/partials/session.php new file mode 100644 index 0000000..d4ee141 --- /dev/null +++ b/partials/session.php @@ -0,0 +1,15 @@ +<?php +// Shared session bootstrap. Must be included before any output. +// Security headers (CSP, HSTS, nosniff, Referrer-Policy, Permissions-Policy) +// are owned by nginx — do not re-emit them here (browsers can conflict on +// duplicate policies). +if (session_status() !== PHP_SESSION_ACTIVE) { + session_set_cookie_params([ + 'lifetime' => 0, + 'path' => '/', + 'secure' => true, + 'httponly' => true, + 'samesite' => 'Lax', + ]); + session_start(); +} |
