SPT Developer opened SPR-13691 and commented
I am using my original CORS interceptor and dispatching OPTIONS request for pre-flight.
servlet.setDispatchOptionsRequest(true);
After upgraded Spring Boot to 1.3.0 RC1 with Spring 4.2.2, Spring CORS intercepted my original. In order to disable Spring CORS, I added CorsUtils in my classpath temporary.
package org.springframework.web.cors;
import javax.servlet.http.HttpServletRequest;
/**
* CORS utility (Overriding)
*/
public class CorsUtils {
/**
* Returns {@code true} if the request is a valid CORS one.
*/
public static boolean isCorsRequest(HttpServletRequest request) {
// Disable Spring CORS by force.
return false;
}
/**
* Returns {@code true} if the request is a valid CORS pre-flight one.
*/
public static boolean isPreFlightRequest(HttpServletRequest request) {
// Disable Spring CORS by force.
return false;
}
}
To fix it permanently, please add option to swith on/off Spring CORS.
if (!enableSpringCors || !CorsUtils.isCorsRequest(request)) {
......
if (enableSpringCors && CorsUtils.isCorsRequest(request)) {
......
if (this.dispatchOptionsRequest || (enableSpringCors && CorsUtils.isPreFlightRequest(request))) {
......
if (enableSpringCors && CorsUtils.isPreFlightRequest(request)) {
......
Affects: 4.2.2
Issue Links:
0 votes, 5 watchers
SPT Developer opened SPR-13691 and commented
I am using my original CORS interceptor and dispatching OPTIONS request for pre-flight.
After upgraded Spring Boot to 1.3.0 RC1 with Spring 4.2.2, Spring CORS intercepted my original. In order to disable Spring CORS, I added CorsUtils in my classpath temporary.
To fix it permanently, please add option to swith on/off Spring CORS.
Affects: 4.2.2
Issue Links:
0 votes, 5 watchers