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 <andrea@softinstigate.com> 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 TypeMethodDescriptionvoidhandleRequest(io.undertow.server.HttpServerExchange exchange) static voidinjectAccessControlAllowHeaders(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:
handleRequestin interfaceio.undertow.server.HttpHandler- Specified by:
handleRequestin classPipelinedHandler- Parameters:
exchange-- Throws:
Exception
-