Class DefaultCorsHandler
java.lang.Object
org.apache.tapestry5.http.internal.services.DefaultCorsHandler
- All Implemented Interfaces:
CorsHandler
Default CorsHandler
implementation. It will process all requests with an Origin HTTP header,
regardless of path. It will also perform preflight requests if
CorsHandlerHelper.isPreflight(HttpServletRequest)
returns true
. Most logic is delegated is CorsHandlerHelper
.
This implementation is inspired by the cors NPM module.
- Since:
- 5.8.2
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Handles the CORS processing of a request, possibly doing nothing.
-
Constructor Details
-
DefaultCorsHandler
-
-
Method Details
-
handle
public CorsHandlerResult handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException Description copied from interface:CorsHandler
Handles the CORS processing of a request, possibly doing nothing. This method cannot returnnull
.- Specified by:
handle
in interfaceCorsHandler
- Returns:
- a CorsHandlerResult object.
- Throws:
IOException
-