I want overwite CorsUtils abstract class from here https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/cors/reactive/CorsUtils.html. I tried this:
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.stereotype.Component;
import org.springframework.web.cors.reactive.CorsUtils;
@Component
public class CustomPostGlobalFilter extends CorsUtils {
public static boolean isCorsRequest(ServerHttpRequest request) {
return false;
}
public static boolean isPreFlightRequest(ServerHttpRequest request) {
return false;
}
public static boolean isSameOrigin(ServerHttpRequest request) {
return false;
}
}
But looks like this is not the correct way to implement this. Can you guide me what is the proper way to implement this?