When using spring cloud gateway as a route, we want to handle PreFlight Request in handler which from HandlerMappings, but after spring-WebFlux 5.3.4, PreFlight Request can not reach invokeHandler, even after overriding the 'getHandler()' in AbstractHandlerMapping which works well before 5.3.4.

code

Is it possible to just delete or bring a config to disable the code above, so the PreFlight Request can be handled in the handler?

Comment From: rstoyanchev

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements.

As an aside, pre-flight requests are built-in in WebFlux. You cannot handle them with a handler. You would need to intercept earlier, e.g. using a WebFilter.