fix(env): update frontend URL variable and adjust CORS settings for improved origin handling
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
<?php
|
||||
|
||||
$frontendUrls = array_values(array_filter(array_map(
|
||||
'trim',
|
||||
explode(',', (string) env(
|
||||
'FRONTEND_URLS',
|
||||
env('FRONTEND_URL', 'http://localhost:4200')
|
||||
))
|
||||
)));
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
@@ -19,9 +27,11 @@ return [
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
'allowed_origins' => [env('FRONTEND_URL', 'http://localhost:4200')],
|
||||
'allowed_origins' => $frontendUrls,
|
||||
|
||||
'allowed_origins_patterns' => [],
|
||||
'allowed_origins_patterns' => [
|
||||
'#^https://[a-z0-9-]+\.shopit\.com\.ar$#',
|
||||
],
|
||||
|
||||
'allowed_headers' => ['*'],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user