Closed ghost closed 5 years ago
Little update, it's not only on localhost but also on my live staging server.
'default_profile' => [
'allow_credentials' => false,
'allow_origins' => [
'*',
],
'allow_methods' => [
'POST',
'GET',
'OPTIONS',
'PUT',
'PATCH',
'DELETE',
],
'allow_headers' => [
'Content-Type',
'X-Auth-Token',
'Origin',
'Authorization',
],
'expose_headers' => [
'Cache-Control',
'Content-Language',
'Content-Type',
'Expires',
'Last-Modified',
'Pragma',
],
'forbidden_response' => [
'message' => 'Forbidden (cors).',
'status' => 403,
],
/*
* Preflight request will respond with value for the max age header.
*/
'max_age' => 60 * 60 * 24,
],
were you able to fix this issue?
@d-pollard No :/
The CORS request needs to return a 204 No Content
Response I believe
barryvdh/laravel-cors
has the same issue: https://github.com/barryvdh/laravel-cors/issues/362
Feel free to submit a PR with tests that fixes this.
I receive the message only on chrome and only on the aws/forge server (not in localhost - homestead). Everything seems to work well.
I noticed that the preflight don't show the message "Preflight OK" on the aws/forge server. But yes on the localhost.
Laravel 5.7.15 php: 7.2.5 laravel-cors 1.4 vuejs 3.6.2 (vue-cli)