Class CORSHandler

java.lang.Object
org.restheart.handlers.PipelinedHandler
org.restheart.handlers.CORSHandler
All Implemented Interfaces:
io.undertow.server.HttpHandler

public class CORSHandler extends PipelinedHandler
Author:
Andrea Di Cesare <[email protected]> Adds the response CORS headers defined by the Service's accessControl*() methods
  • Constructor Details

    • CORSHandler

      public CORSHandler()
      Creates a new instance of CORSHandler
    • CORSHandler

      public CORSHandler(PipelinedHandler next)
      Creates a new instance of CORSHandler
      Parameters:
      next -
  • Method Details

    • injectAccessControlAllowHeaders

      public static void injectAccessControlAllowHeaders(io.undertow.server.HttpServerExchange exchange)
    • 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