18 خطوط
502 B
PHP
18 خطوط
502 B
PHP
<?php
|
|
|
|
$allowedOrigins = array_filter(array_map(
|
|
'trim',
|
|
explode(',', (string) env('CORS_ALLOWED_ORIGINS', 'http://localhost:5173,http://localhost:5174,http://127.0.0.1:5173,http://127.0.0.1:5174'))
|
|
));
|
|
|
|
return [
|
|
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
|
'allowed_methods' => ['*'],
|
|
'allowed_origins' => $allowedOrigins,
|
|
'allowed_origins_patterns' => [],
|
|
'allowed_headers' => ['*'],
|
|
'exposed_headers' => [],
|
|
'max_age' => 0,
|
|
'supports_credentials' => true,
|
|
];
|