HTTP 403 Forbidden - CORS Issue
erikig opened this issue · 1 comments
erikig commented
Running the laravel backend against any of the front-ends results in a 403 Error:
No 'Access-Control-Allow-Origin' header is present on the requested resource
Origin 'http://localhost:4100' is therefore not allowed access.
The response had HTTP status code 403.
erikig commented
Seems like the CORS config was looking for origins data in the global environment.
Got this to work by updating config/cors.php
'allowedOrigins' => env('CORS_ALLOWED_ORIGINS') ? explode(',', env('CORS_ALLOWED_ORIGINS')) : ['*'],
with
'allowedOrigins' => ['*'],