CorsInterceptor should add to the first interceptor in InterceptorChain? #22459
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Affects: Spring Webmvc 4.3.14
I use CorsRegistry to add cors configuration support, but it does not work.
I found the cors process code in AbstractHandlerMapping
the code add the CorsInterceptor to the end of InterceptorChain,
but a LoginInterceptor has exist in the InterceptorChain, and before CorsInterceptor now.
so when the request reach, spring mvc will execute the LoginInterceptor first, and the LoginInterceptor throw a NotLoginException.
It cause that CorsInterceptor to not execute, so the brower client will throw error.
Maybe it's a bug and the CorsInterceptor should add to the first interceptor in InterceptorChain?
The text was updated successfully, but these errors were encountered: