public abstract class CorsUtils extends Object
Constructor and Description |
---|
CorsUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isCorsRequest(HttpServletRequest request)
Returns
true if the request is a valid CORS one by checking Origin
header presence and ensuring that origins are different. |
static boolean |
isPreFlightRequest(HttpServletRequest request)
Returns
true if the request is a valid CORS pre-flight one by checking {code OPTIONS} method with
Origin and Access-Control-Request-Method headers presence. |
public static boolean isCorsRequest(HttpServletRequest request)
true
if the request is a valid CORS one by checking Origin
header presence and ensuring that origins are different.public static boolean isPreFlightRequest(HttpServletRequest request)
true
if the request is a valid CORS pre-flight one by checking {code OPTIONS} method with
Origin
and Access-Control-Request-Method
headers presence.