This commit is contained in:
2025-11-30 03:28:17 +01:00
parent c7e355c1ea
commit 733e3fad1b
2 changed files with 6 additions and 7 deletions

View File

@@ -3,7 +3,8 @@
// Optional: zentrale Config laden (wenn du magst)
declare(strict_types=1);
require $_SERVER['DOCUMENT_ROOT']. '/../config/fileload.php';
$apibasedir = require_once $_SERVER['DOCUMENT_ROOT'];
require $apibasedir. '/../config/fileload.php';
// Basis-Header (CORS, JSON)
header('Content-Type: application/json; charset=utf-8');
@@ -40,12 +41,12 @@ if ($path === '/') {
// Routing nach Bereich
if (str_starts_with($path, '/v1/')) {
require __DIR__ . '/router/router.v1.php';
require_once $apibasedir.'/router/router.v1.php';
exit;
}
if (str_starts_with($path, '/internal/')) {
require __DIR__ . '/router/router.internal.php';
require_once $apibasedir. '/router/router.internal.php';
exit;
}