You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a basic nelmio_cors.yaml configuration, when I perform a GET Request from my Nextjs Frontend, everything works perfectly fine, when I perform a POST Request instead, it returns a 400 with the headers you can see below, I have a basic POST Controller for my route where Im not using any sessions so the return doesnt make any sense to me, especially because the get request works.
Ive tried many different configurations for nelmio which didnt change anything whatsoever.
I also tried using Firefox, Chrome and Edge.
Using Postman it works, so its definitely a Cors error.
The text was updated successfully, but these errors were encountered:
I found a possible solution. Make sure all the headers in OPTIONS request are mentioned in the allow_headers section. In my case the browser was also sending 'X-Requested-With' header. After I added it to allow_headers, it finally started working as expected.
I got a basic nelmio_cors.yaml configuration, when I perform a GET Request from my Nextjs Frontend, everything works perfectly fine, when I perform a POST Request instead, it returns a 400 with the headers you can see below, I have a basic POST Controller for my route where Im not using any sessions so the return doesnt make any sense to me, especially because the get request works.
Ive tried many different configurations for nelmio which didnt change anything whatsoever.
I also tried using Firefox, Chrome and Edge.
Using Postman it works, so its definitely a Cors error.
The text was updated successfully, but these errors were encountered: