Files
2026-10-21 18:34:35 +02:00

16 lines
553 B
PHP

<?php
// TEMPORARY diagnostic - delete after checking. Shows which variables carry the Authorization header (values hidden).
header('Content-Type: application/json');
$found = [];
foreach ($_SERVER as $k => $v) {
if (stripos($k, 'AUTH') !== false) {
$found[$k] = substr((string)$v, 0, 12) . '...';
}
}
echo json_encode([
'sapi' => PHP_SAPI,
'server_vars' => $found,
'getallheaders_has_auth' => function_exists('getallheaders')
&& isset(array_change_key_case(getallheaders())['authorization']),
], JSON_PRETTY_PRINT);