-
-
Notifications
You must be signed in to change notification settings - Fork 613
CORS Not working #522
Comments
At last, after the effort of 3 days, I have removed the fruitcake package and using my own middleware. |
Same here, in my dev env suddenly something happened and now cors warning is firing all the time. |
It was just an error in the Model, not related to cors, sorted now. |
Also struggled for the whole weekend. Added custom middleware and it works now. |
Stack: I have no idea if this will help or why it's behaving like this, but for some reason if I send an The browser seems not to care about the 405 but the fact that the 405 response has no Butif I send a request to any Bonus Note |
Same thing, I removed the fruitcake cors and using my own middleware.
|
This did it for me. For whatever reason, using the CORS package didn't work on any routes, even if they were explicitly specified. I don't believe that this solution covers preflight requests appropriately, but it handles most cases. |
I had same issues and spent hours of debugging but at last I just run Do not forgot to change your ENV to production settings such as db, keys and etc before running config:cache Please note that I had this issue when the app is on server. Everything works perfectly in local development. |
Same issue here. The preflight simply does not seem to work for most situations. Nothing I tried would send the headers except adding them in middleware or to the route file manually. There should just be an option to disable preflight and always add the headers - since that is what most of us running into this issue are doing. cc: @barryvdh |
getting error:
ww.example.com has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
The text was updated successfully, but these errors were encountered: