Class CorsSupport

All Implemented Interfaces:
Handler, HttpService, ServerLifecycle

Deprecated, for removal: This API element is subject to removal in a future version.
CORS configuration is centralized to module helidon-webserver-cors with io.helidon.webserver.cors.CorsFeature either from ServiceRegistry, or through one of the feature's static factory or builder methods; paths configured in config are registered first, before paths configured through service registry; this class will be removed in a future version of Helidon
SE implementation of CorsSupportBase.
  • Method Details

    • builder

      public static CorsSupport.Builder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      A new fluent API builder to customize setup of CorsSupport.
      Returns:
      new builder for CorsSupport
    • create

      public static CorsSupport create()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create CORS support with defaults.
      Returns:
      new CorsSupport with default settings
    • create

      @Deprecated(since="4.4.0", forRemoval=true) public static CorsSupport create(Config config)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
    • create

      public static CorsSupport create(Config config)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      @Deprecated(since="4.4.0", forRemoval=true) public static CorsSupport createMapped(Config config)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
    • createMapped

      public static CorsSupport createMapped(Config config)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
    • routing

      public void routing(HttpRules rules)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: HttpService
      Updates the routing to add handlers of this service.
      Specified by:
      routing in interface HttpService
      Parameters:
      rules - to update
    • handle

      public void handle(ServerRequest req, ServerResponse res)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Handler
      Handle request. This method must not return before the response is completed. If the method does asynchronous operations, it must wait for them to complete before returning.
      Specified by:
      handle in interface Handler
      Parameters:
      req - request
      res - response
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • helper

      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      helper in class CorsSupportBase<ServerRequest,ServerResponse,CorsSupport,CorsSupport.Builder>