Comments (4)
It should actually just return and empty response. Can you post your configuration and and example request?
from laravel-cors.
Interestingly I don't get the response in chrome, only in firebug using firefox
config.php
<?php
return array(
/*
|--------------------------------------------------------------------------
| Laravel CORS Defaults
|--------------------------------------------------------------------------
|
| The defaults are the default values applied to all the paths that match,
| unless overridden in a specific URL configuration.
| If you want them to apply to everything, you must define a path with ^/.
|
| allow_origin and allow_headers can be set to * to accept any value,
| the allowed methods however have to be explicitly listed.
|
*/
'defaults' => array(
'allow_credentials' => false,
'allow_origin' => array(),
'allow_headers' => array(),
'allow_methods' => array(),
'expose_headers' => array(),
'max_age' => 0,
),
'paths' => array(
'^/v1' => array(
'allow_origin' => array('*'),
'allow_headers' => array('authorization','x-requested-with','apiKey'),
'allow_methods' => array('GET','POST','PUT','DELETE'),
'max_age' => 3600,
),
),
);
from laravel-cors.
Did this get resolved? I made some big rewrites in a new branch, by using an existing middleware.
You can checkout the stack-cors branch:
"barryvdh/laravel-cors": "dev-stack-cors@dev",
Should work with the same config, maybe that helps?
Edit: is now the 0.2.x branch
from laravel-cors.
thank you for the update. I just updated the plugin to 0.2.* and it looks it has fixed whatever issues we were having previously.
from laravel-cors.
Related Issues (20)
- [Solution] Add exception handler cross domain for laravel 8.x HOT 2
- Multiple CORS header ‘Access-Control-Allow-Origin’ not allowed HOT 1
- Laravel 8 Error Cors HOT 2
- Cannot set the same Access-Control-Allow-Headers values in apache setting? HOT 1
- 500 Error Class "Fruitcake\Cors\CorsServiceProvider" not found HOT 2
- Cors not working with POST request with Docker and Nginx HOT 3
- Specify domain for paths HOT 2
- CORS configuration per route HOT 1
- Middleware API POST request with CORS issue (Passport and Auth0) HOT 1
- how to return or expose these Access-Control-Allow-Methods and Access-Control-Allow-Headers ?
- Laravel cors are not returned HOT 3
- Add laravel9 support HOT 4
- v2.1.0 it's a breaking change HOT 7
- Composer error upon installing in Laravel 7
- How to add add Access-Control-Allow-Origin to error 500 response
- PHP 8.1 Passing null to parameter #1 ($haystack) of type string is deprecated
- How to block Cors on a same subdomain
- strpos(): Argument #1 ($haystack) must be of type string, array given on \vendor\fruitcake\laravel-cors HOT 2
- Access-Control-Allow-Origin is missing laravel-9 and vuejs3
- Composer error upon installing in Laravel 9 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-cors.