Package org.spincast.plugins.undertow
Class CorsHandlerDefault
java.lang.Object
org.spincast.plugins.undertow.CorsHandlerDefault
- All Implemented Interfaces:
io.undertow.server.HttpHandler,CorsHandler
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCorsHandlerDefault(io.undertow.server.HttpHandler nextHandler, StaticResourceCorsConfig corsConfig, CorsFilter corsFilter) -
Method Summary
Modifier and TypeMethodDescriptionprotected CorsFilterClientcreateCorsFilterClient(io.undertow.server.HttpServerExchange exchange, StaticResourceCorsConfig corsConfig) Create the client for the cors filter.protected StaticResourceCorsConfigprotected CorsFilterprotected io.undertow.server.HttpHandlerprotected Set<HttpMethod>Those are the valid HTTP methods for requests to static resources served directly by the HTTP server.voidhandleRequest(io.undertow.server.HttpServerExchange exchange)
-
Field Details
-
logger
protected static final org.slf4j.Logger logger
-
-
Constructor Details
-
CorsHandlerDefault
public CorsHandlerDefault(io.undertow.server.HttpHandler nextHandler, @Nullable StaticResourceCorsConfig corsConfig, CorsFilter corsFilter)
-
-
Method Details
-
getNextHandler
protected io.undertow.server.HttpHandler getNextHandler() -
getCorsConfig
-
getCorsFilter
-
handleRequest
- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Throws:
Exception
-
createCorsFilterClient
protected CorsFilterClient createCorsFilterClient(io.undertow.server.HttpServerExchange exchange, StaticResourceCorsConfig corsConfig) Create the client for the cors filter. -
getStaticResourceCorsAllowedMethods
Those are the valid HTTP methods for requests to static resources served directly by the HTTP server.
-