generovane subory apilite,

fix globalnych $_SERVER v konfiguracii
This commit is contained in:
2026-02-09 07:48:07 +01:00
parent d9a283cfdf
commit e59bfc26a0
8 changed files with 46 additions and 9 deletions

View File

@ -25,7 +25,7 @@ if (!$loaded) {
}
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
$host = $_SERVER['HTTP_HOST'];
$uri = $_SERVER['REQUEST_URI']; // obsahuje aj query string
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
$uri = $_SERVER['REQUEST_URI'] ?? ''; // obsahuje aj query string
define('URL_PREFIX', $protocol.$host.str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']));