public.javadoc.org.spincast.plugins.undertow.CorsHandlerDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
CorsHandlerDefault (org.spincast:spincast-framework 1.0.0 API)
org.spincast.plugins.undertow
Class CorsHandlerDefault
- java.lang.Object
-
- org.spincast.plugins.undertow.CorsHandlerDefault
-
- All Implemented Interfaces:
- io.undertow.server.HttpHandler, CorsHandler
public class CorsHandlerDefault
extends Object
implements CorsHandler
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
CorsHandlerDefault(io.undertow.server.HttpHandler nextHandler,
StaticResourceCorsConfig corsConfig,
CorsFilter corsFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
protected CorsFilterClient
createCorsFilterClient(io.undertow.server.HttpServerExchange exchange,
StaticResourceCorsConfig corsConfig)
Create the client for the cors filter.
protected StaticResourceCorsConfig
getCorsConfig()
protected CorsFilter
getCorsFilter()
protected io.undertow.server.HttpHandler
getNextHandler()
protected Set<HttpMethod>
getStaticResourceCorsAllowedMethods()
Those are the valid HTTP methods for requests to
static resources served directly by the HTTP server.
void
handleRequest(io.undertow.server.HttpServerExchange exchange)
-
-
Constructor Detail
-
CorsHandlerDefault
public CorsHandlerDefault(io.undertow.server.HttpHandler nextHandler,
@Nullable
StaticResourceCorsConfig corsConfig,
CorsFilter corsFilter)
-
Method Detail
-
getNextHandler
protected io.undertow.server.HttpHandler getNextHandler()
-
getCorsConfig
protected StaticResourceCorsConfig getCorsConfig()
-
getCorsFilter
protected CorsFilter getCorsFilter()
-
handleRequest
public void handleRequest(io.undertow.server.HttpServerExchange exchange)
throws Exception
- Specified by:
handleRequest
in interface io.undertow.server.HttpHandler
- Throws:
Exception
-
createCorsFilterClient
protected CorsFilterClient createCorsFilterClient(io.undertow.server.HttpServerExchange exchange,
StaticResourceCorsConfig corsConfig)
Create the client for the cors filter.
-
getStaticResourceCorsAllowedMethods
protected Set<HttpMethod> getStaticResourceCorsAllowedMethods()
Those are the valid HTTP methods for requests to
static resources served directly by the HTTP server.
Copyright © 2019. All rights reserved.