File tree 1 file changed +8
-0
lines changed
spring-webmvc/src/main/java/org/springframework/web/servlet/handler
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 36
36
import org .springframework .util .PathMatcher ;
37
37
import org .springframework .web .HttpRequestHandler ;
38
38
import org .springframework .web .context .request .WebRequestInterceptor ;
39
+ import org .springframework .web .context .request .async .WebAsyncManager ;
40
+ import org .springframework .web .context .request .async .WebAsyncUtils ;
39
41
import org .springframework .web .context .support .WebApplicationObjectSupport ;
40
42
import org .springframework .web .cors .CorsConfiguration ;
41
43
import org .springframework .web .cors .CorsConfigurationSource ;
@@ -571,6 +573,12 @@ public CorsInterceptor(@Nullable CorsConfiguration config) {
571
573
public boolean preHandle (HttpServletRequest request , HttpServletResponse response , Object handler )
572
574
throws Exception {
573
575
576
+ // Consistent with CorsFilter, ignore ASYNC dispatches
577
+ WebAsyncManager asyncManager = WebAsyncUtils .getAsyncManager (request );
578
+ if (asyncManager .hasConcurrentResult ()) {
579
+ return true ;
580
+ }
581
+
574
582
return corsProcessor .processRequest (this .config , request , response );
575
583
}
576
584
You can’t perform that action at this time.
0 commit comments