1e51ef7def
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/ - 12 code-workspace-Files - STATUS-*.md - viele M/D/R-Änderungen an bereits getrackten Files - .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
33 lines
935 B
PHP
33 lines
935 B
PHP
<?php
|
|
/**
|
|
* Mock-Bootstrap — DB-frei, leichtgewichtig.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/../../php/config.php';
|
|
require_once __DIR__ . '/../../php/lib/auth.php';
|
|
require_once __DIR__ . '/../../php/lib/response.php';
|
|
require_once __DIR__ . '/../../php/lib/validation.php';
|
|
require_once __DIR__ . '/test-data.php';
|
|
require_once __DIR__ . '/log.php';
|
|
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
header('Access-Control-Allow-Origin: *');
|
|
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
|
|
header('Access-Control-Allow-Headers: Content-Type, Authorization');
|
|
|
|
if (($_SERVER['REQUEST_METHOD'] ?? '') === 'OPTIONS') {
|
|
http_response_code(204);
|
|
exit;
|
|
}
|
|
|
|
set_exception_handler(function (Throwable $e) {
|
|
http_response_code(500);
|
|
echo json_encode([
|
|
'error' => 'mock_internal',
|
|
'message' => $e->getMessage(),
|
|
], JSON_UNESCAPED_UNICODE);
|
|
exit;
|
|
});
|