Skip to content

Provide API to Expose the Handling of PreFlight Requests in WebFlux #26257

Closed
@rwinch

Description

@rwinch

Spring MVC provides HandlerMappingIntrospector which exposes the HandlerMappings CORS configuration through the CorsConfigurationSource interface. WebFlux allows users to register a CorsConfigurationSource through AbstractHandlerMapping, but does not provide a way for looking up the CORS configuration. This is important because in order for CORS to work with Spring Security the CorsWebFilter needs to be placed after the headers but before authorization. We want to inject headers, but preflight requests will not contain credentials in them so all authorization will be rejected.

It would be nice if WebFlux allowed for exposing the CORS configuration similar to how MVC does.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions