Class CorsSupport

All Implemented Interfaces:
Handler, Service, BiConsumer<ServerRequest,ServerResponse>

SE implementation of CorsSupportBase.
  • Method Details

    • builder

      public static CorsSupport.Builder builder()
      Returns:
      new builder for CorsSupport
    • create

      public static CorsSupport create()
      Returns:
      new CorsSupport with default settings
    • update

      public void update(Routing.Rules rules)
      Description copied from interface: Service
      Updates Routing.Rules with handlers representing this service.
      Specified by:
      update in interface Service
      Parameters:
      rules - a routing rules to update
    • accept

      public void accept(ServerRequest request, ServerResponse response)
      Description copied from interface: Handler
      Handles request and response usually called from the Routing.
      Specified by:
      accept in interface BiConsumer<ServerRequest,ServerResponse>
      Specified by:
      accept in interface Handler
      Parameters:
      request - an HTTP server request.
      response - an HTTP server response.
    • create

      public static CorsSupport create(Config config)
      Creates a new CorsSupport instance based on the provided configuration expected to match the basic CrossOriginConfig format.
      Parameters:
      config - node containing the cross-origin information
      Returns:
      initialized CorsSupport instance
    • createMapped

      public static CorsSupport createMapped(Config config)
      Creates a new CorsSupport instance based on the provided configuration expected to contain mapped cross-origin config information.
      Parameters:
      config - node containing the mapped cross-origin information
      Returns:
      initialized CorsSupport instance
    • toString

      public String toString()
      Overrides:
      toString in class Object