diff --git a/public/index.php b/public/index.php index 3d8ea9d..59586c2 100644 --- a/public/index.php +++ b/public/index.php @@ -19,6 +19,11 @@ AppConfig::loadEnv(__DIR__ . '/..'); // Bootstrap application $app = AppBootstrap::create(); +// Global OPTIONS route for CORS preflight (must be before other routes) +$app->options('/{routes:.+}', function ($request, $response) { + return $response->withStatus(204); +}); + // Root route - redirect to docs $app->get('/', function ($request, $response) { return $response