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
-
Constructor Summary
ConstructorDescriptionCorsHandlerDefault
(io.undertow.server.HttpHandler nextHandler, StaticResourceCorsConfig corsConfig, CorsFilter corsFilter) -
Method Summary
Modifier and TypeMethodDescriptionprotected CorsFilterClient
createCorsFilterClient
(io.undertow.server.HttpServerExchange exchange, StaticResourceCorsConfig corsConfig) Create the client for the cors filter.protected StaticResourceCorsConfig
protected CorsFilter
protected io.undertow.server.HttpHandler
protected Set<HttpMethod>
Those are the valid HTTP methods for requests to static resources served directly by the HTTP server.void
handleRequest
(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:
handleRequest
in 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.
-