This commit is contained in:
2025-12-01 01:19:25 +01:00
parent c2db8ddb63
commit 7eb0994abe
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
// /api/v1/debug/debug.session.php
declare(strict_types=1);
function debug_session_handle_request(): array
{
if (session_status() !== PHP_SESSION_ACTIVE) {
session_start();
}
return [
'ok' => true,
'session_id' => session_id(),
'session' => $_SESSION,
'cookies' => $_COOKIE,
'server' => [
'host' => $_SERVER['HTTP_HOST'] ?? null,
'uri' => $_SERVER['REQUEST_URI'] ?? null,
],
];
}