diff --git a/src/config/cors.php b/src/config/cors.php new file mode 100644 index 0000000..5406a06 --- /dev/null +++ b/src/config/cors.php @@ -0,0 +1,32 @@ + ['api/*', 'v1/*'], + + 'allowed_methods' => ['*'], + + 'allowed_origins' => [ + env('APP_URL', 'http://localhost'), + env('APP_CONNECT_URL', 'http://localhost'), + // Lokal: + 'http://app.aziros.local', + 'http://api.aziros.local', + // Staging: + 'https://app.staging.aziros.com', + // Production: + 'https://app.aziros.com', + 'https://www.aziros.com', + ], + + 'allowed_origins_patterns' => [ + '#^https?://.*\.aziros\.(com|local)$#', + ], + + 'allowed_headers' => ['*'], + + 'exposed_headers' => [], + + 'max_age' => 0, + + 'supports_credentials' => true, +];