Package org.restheart.handlers
Class CORSHandler
java.lang.Object
org.restheart.handlers.PipelinedHandler
org.restheart.handlers.CORSHandler
- All Implemented Interfaces:
io.undertow.server.HttpHandler
- Author:
- Andrea Di Cesare <[email protected]> Adds the response CORS headers defined by the Service's accessControl*() methods
-
Field Summary
Fields inherited from class org.restheart.handlers.PipelinedHandler
CONTENT_TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of CORSHandlerCORSHandler
(PipelinedHandler next) Creates a new instance of CORSHandler -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleRequest
(io.undertow.server.HttpServerExchange exchange) static void
injectAccessControlAllowHeaders
(io.undertow.server.HttpServerExchange exchange) Methods inherited from class org.restheart.handlers.PipelinedHandler
getNext, next, pipe, setNext
-
Constructor Details
-
CORSHandler
public CORSHandler()Creates a new instance of CORSHandler -
CORSHandler
Creates a new instance of CORSHandler- Parameters:
next
-
-
-
Method Details
-
injectAccessControlAllowHeaders
public static void injectAccessControlAllowHeaders(io.undertow.server.HttpServerExchange exchange) -
handleRequest
- Specified by:
handleRequest
in interfaceio.undertow.server.HttpHandler
- Specified by:
handleRequest
in classPipelinedHandler
- Parameters:
exchange
-- Throws:
Exception
-