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
    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.
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleRequest(io.undertow.server.HttpServerExchange exchange)
     

    Methods inherited from class org.restheart.handlers.PipelinedHandler

    getNext, next, pipe, setNext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      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 Details

    • handleRequest

      public void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception
      Specified by:
      handleRequest in interface io.undertow.server.HttpHandler
      Specified by:
      handleRequest in class PipelinedHandler
      Parameters:
      exchange -
      Throws:
      Exception