Class DefaultCorsHandler
- java.lang.Object
-
- org.apache.tapestry5.http.internal.services.DefaultCorsHandler
-
- All Implemented Interfaces:
CorsHandler
public class DefaultCorsHandler extends java.lang.Object implements CorsHandler
Default
CorsHandler
implementation. It will process all requests with an Origin HTTP header, regardless of path. It will also perform preflight requests ifCorsHandlerHelper.isPreflight(HttpServletRequest)
returnstrue
. Most logic is delegated isCorsHandlerHelper
.This implementation is inspired by the cors NPM module.
- Since:
- 5.8.2
- See Also:
CorsHandlerHelper
-
-
Constructor Summary
Constructors Constructor Description DefaultCorsHandler(CorsHandlerHelper helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorsHandlerResult
handle(HttpServletRequest request, HttpServletResponse response)
Handles the CORS processing of a request, possibly doing nothing.
-
-
-
Constructor Detail
-
DefaultCorsHandler
public DefaultCorsHandler(CorsHandlerHelper helper)
-
-
Method Detail
-
handle
public CorsHandlerResult handle(HttpServletRequest request, HttpServletResponse response) throws java.io.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:
java.io.IOException
-
-