Interface CorsDirectives

All Known Implementing Classes:
CorsDirectives$

public interface CorsDirectives
Provides directives that implement the CORS mechanism, enabling cross origin requests.

  • Method Summary

    Modifier and Type
    Method
    Description
    Directive<scala.runtime.BoxedUnit>
    Wraps its inner route with support for the CORS mechanism, enabling cross origin requests.
    Directive<scala.runtime.BoxedUnit>
    cors(CorsSettings settings)
    Wraps its inner route with support for the CORS mechanism, enabling cross origin requests.
  • Method Details

    • cors

      Directive<scala.runtime.BoxedUnit> cors()
      Wraps its inner route with support for the CORS mechanism, enabling cross origin requests.

      In particular the recommendation written by the W3C in https://www.w3.org/TR/cors/ is implemented by this directive.

      The settings are loaded from the Actor System configuration.

      Returns:
      (undocumented)
    • cors

      Directive<scala.runtime.BoxedUnit> cors(CorsSettings settings)
      Wraps its inner route with support for the CORS mechanism, enabling cross origin requests.

      In particular the recommendation written by the W3C in https://www.w3.org/TR/cors/ is implemented by this directive.

      Parameters:
      settings - the settings used by the CORS filter
      Returns:
      (undocumented)