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
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields inherited from class org.restheart.handlers.PipelinedHandler
CONTENT_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of OptionsHandler OPTIONS is used in CORS preflight phase and needs to be outside the security zone (i.e.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
Modifier and TypeMethodDescriptionvoidhandleRequest(io.undertow.server.HttpServerExchange exchange) Methods inherited from class org.restheart.handlers.PipelinedHandler
getNext, next, pipe, setNext
-
Constructor Details
-
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
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 Details
-
handleRequest
- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Specified by:
handleRequestin classPipelinedHandler- Parameters:
exchange-- Throws:
Exception
-