Env
This commit is contained in:
parent
7a6e1a7adc
commit
eea3f4452e
2 changed files with 7 additions and 1 deletions
|
@ -21,3 +21,6 @@ S3_Bucket=abc
|
|||
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
|
||||
ENABLED_CORS=1
|
||||
CORS_URL=*
|
||||
|
|
|
@ -14,8 +14,11 @@ class CorsMiddleware
|
|||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if(getenv("ENABLED_CORS") == 0) {
|
||||
return $next($request);
|
||||
}
|
||||
$headers = [
|
||||
'Access-Control-Allow-Origin' => '*',
|
||||
'Access-Control-Allow-Origin' => getenv("CORS_URL"),
|
||||
'Access-Control-Allow-Methods' => 'POST, GET, OPTIONS, PUT, DELETE',
|
||||
'Access-Control-Allow-Credentials' => 'true',
|
||||
'Access-Control-Max-Age' => '86400',
|
||||
|
|
Reference in a new issue