Cors should respect the .env var for CORS domains

This commit is contained in:
Brady Wetherington 2022-02-20 12:22:18 -08:00
parent 6ef053bc52
commit cd2c92fd6c

View file

@ -1,10 +1,14 @@
<?php
$allowed_origins = env('CORS_ALLOWED_ORIGINS') !== null ?
explode(',', env('CORS_ALLOWED_ORIGINS')) : [];
return [
'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedOrigins' => $allowed_origins,
'allowedHeaders' => ['*'],