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. |
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.
To be used in combination with isCorsRequest(HttpServletRequest) since
regular CORS checks are not invoked here for performance reasons.