private class AbstractHandlerMapping.PreFlightHandler extends java.lang.Object implements HttpRequestHandler, CorsConfigurationSource
Modifier and Type | Field and Description |
---|---|
private CorsConfiguration |
config |
Constructor and Description |
---|
PreFlightHandler(CorsConfiguration config) |
Modifier and Type | Method and Description |
---|---|
CorsConfiguration |
getCorsConfiguration(HttpServletRequest request)
Return a
CorsConfiguration based on the incoming request. |
void |
handleRequest(HttpServletRequest request,
HttpServletResponse response)
Process the given request, generating a response.
|
private final CorsConfiguration config
public PreFlightHandler(CorsConfiguration config)
public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
HttpRequestHandler
handleRequest
in interface HttpRequestHandler
request
- current HTTP requestresponse
- current HTTP responsejava.io.IOException
- in case of I/O errorspublic CorsConfiguration getCorsConfiguration(HttpServletRequest request)
CorsConfigurationSource
CorsConfiguration
based on the incoming request.getCorsConfiguration
in interface CorsConfigurationSource
CorsConfiguration
, or null
if none