-
Notifications
You must be signed in to change notification settings - Fork 38.1k
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
Missing CORS Headers for Static Resources in WebFlux #26495
Comments
|
Never mind that. It's unrelated to |
Affects: 5.3.3
Affected component: WebFlux
I created a configuration that roughly looks like this:
Expectation:
A GET / OPTIONS request to
http://localhost:8080/public/path/to/file
should return with CORS headers.Actual result:
CORS headers seem to be missing.
Possible cause:
In the bean declaration there seems to be no call to
setCorsConfigurations()
/configureAbstractHandlerMapping()
, although there is in case ofRequestMappingHandler
andRouterFunctionMapping
.FWIW, in the MVC counterpart, this call seems to exist.
I tried adding that line using a breakpoint, after which CORS started working for me.
Sorry if I'm missing something obvious -- I'm just getting started with WebFlux. 😄
For the time being I guess I'll resort to a WebFilter.
The text was updated successfully, but these errors were encountered: