Class OptionsHandler

  • All Implemented Interfaces:
    io.undertow.server.HttpHandler

    public class OptionsHandler
    extends PipelinedHandler
    Author:
    Andrea Di Cesare <andrea@softinstigate.com>
    • 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:
        handleRequest in interface io.undertow.server.HttpHandler
        Specified by:
        handleRequest in class PipelinedHandler
        Parameters:
        exchange -
        Throws:
        Exception