-
Notifications
You must be signed in to change notification settings - Fork 38.5k
CORS Options request forbidden with Webflux [SPR-15704] #20261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sébastien Deleuze commented This behavior is expected since as of this commit the functional router leverages Spring Framework 5 RC2 already provides a way to configure such CORS support via As part of the upcoming Spring Framework 5 RC3, I initially added via #20126 a After a deeper look, I think that would also makes sense to add a For super advanced use cases you could also disable CORS support by providing a no-op Does that make sense to you? |
Guillaume DROUET commented +1, I was expecting such answer, there is no reason to ignore dedicated features that help to manage CORS and it's fine if those features disallow user to declare a route that matches a preflight CORS request. However do you confirm that it's still possible to achieve this with a custom, no-op, CorsProcessor? |
Sébastien Deleuze commented Yes, as discussed in #18266 and #18621 providing a no-op |
Guillaume DROUET commented Yes perfect, I agree this is not recommended but at least people can do it if they really want. |
Guillaume DROUET opened SPR-15704 and commented
This issue has been reproduced with a spring boot application 2.0.0.M2
This is not reproduced with M1.
Please find an example in attachment. A RouterFunction handles an options request to allow CORS. In the unit test, you can see that when a request is sent, a 403 is returned. It seems that the response is inspected by cors processor before the handler has been invoked.
Affects: 5.0 RC2
Attachments:
Issue Links:
The text was updated successfully, but these errors were encountered: