Interface CorsDirectives

  • All Known Subinterfaces:
    Directives
    All Known Implementing Classes:
    CorsDirectives$, Directives$, HttpApp

    public interface CorsDirectives
    Directives for CORS, cross origin requests.

    For an overview on how CORS works, see the MDN web docs page on CORS: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS CORS is part of the WHATWG Fetch "Living Standard" https://fetch.spec.whatwg.org/#http-cors-protocol

    This implementation is based on the akka-http-cors project by Lomig Mégard, licensed under the Apache License, Version 2.0.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Directive<scala.runtime.BoxedUnit> cors()
      Wraps its inner route with support for the CORS mechanism, enabling cross origin requests using the default cors configuration from the actor system.
      Directive<scala.runtime.BoxedUnit> cors​(CorsSettings settings)
      Wraps its inner route with support for the CORS mechanism, enabling cross origin requests using the given cors settings.
    • Method Detail

      • cors

        Directive<scala.runtime.BoxedUnit> cors()
        Wraps its inner route with support for the CORS mechanism, enabling cross origin requests using the default cors configuration from the actor system.
        Returns:
        (undocumented)
      • cors

        Directive<scala.runtime.BoxedUnit> cors​(CorsSettings settings)
        Wraps its inner route with support for the CORS mechanism, enabling cross origin requests using the given cors settings.
        Parameters:
        settings - (undocumented)
        Returns:
        (undocumented)