Package org.restheart.mongodb.handlers
Class OptionsHandler
- java.lang.Object
-
- org.restheart.handlers.PipelinedHandler
-
- org.restheart.mongodb.handlers.OptionsHandler
-
- All Implemented Interfaces:
io.undertow.server.HttpHandler
public class OptionsHandler extends PipelinedHandler
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Field Summary
-
Fields inherited from class org.restheart.handlers.PipelinedHandler
CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description OptionsHandler()Creates a new instance of OptionsHandler OPTIONS is used in CORS preflight phase and needs to be outside the security zone (i.e.OptionsHandler(PipelinedHandler next)Creates a new instance of OptionsHandler OPTIONS is used in CORS preflight phase and needs to be outside the security zone (i.e.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleRequest(io.undertow.server.HttpServerExchange exchange)-
Methods inherited from class org.restheart.handlers.PipelinedHandler
getNext, next, pipe, setNext
-
-
-
-
Constructor Detail
-
OptionsHandler
public OptionsHandler()
Creates a new instance of OptionsHandler OPTIONS is used in CORS preflight phase and needs to be outside the security zone (i.e. not Authorization header required) It is important that OPTIONS responds to any resource URL, regardless its existance: This is because OPTIONS http://restheart.org/employees/tofire/andrea shall not give any information The Access-Control-Allow-Methods header indicates, as part of the response to a preflight request, which methods can be used during the actual request.
-
OptionsHandler
public OptionsHandler(PipelinedHandler next)
Creates a new instance of OptionsHandler OPTIONS is used in CORS preflight phase and needs to be outside the security zone (i.e. not Authorization header required) It is important that OPTIONS responds to any resource URL, regardless its existance: This is because OPTIONS http://restheart.org/employees/tofire/andrea shall not give any information The Access-Control-Allow-Methods header indicates, as part of the response to a preflight request, which methods can be used during the actual request.- Parameters:
next-
-
-
Method Detail
-
handleRequest
public void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Specified by:
handleRequestin classPipelinedHandler- Parameters:
exchange-- Throws:
Exception
-
-