abstract class CorsSettings extends AnyRef

Settings for the CORS support

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

Not for user extension

Self Type
CorsSettingsImpl
Annotations
@DoNotInherit()
Source
CorsSettings.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CorsSettings
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def allowCredentials: Boolean

    If enabled, the header Access-Control-Allow-Credentials is included in the response, indicating that the actual request can include user credentials.

    If enabled, the header Access-Control-Allow-Credentials is included in the response, indicating that the actual request can include user credentials. Examples of user credentials are: cookies, HTTP authentication or client-side certificates.

  2. abstract def allowGenericHttpRequests: Boolean

    Allow generic requests, that are outside the scope of the specification, for example lacking an Origin header to pass through the directive.

    Allow generic requests, that are outside the scope of the specification, for example lacking an Origin header to pass through the directive.

    When false strict CORS filtering is applied and any invalid request will be rejected.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from CorsSettings toany2stringadd[CorsSettings] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CorsSettings, B)
    Implicit
    This member is added by an implicit conversion from CorsSettings toArrowAssoc[CorsSettings] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  8. def ensuring(cond: (CorsSettings) => Boolean, msg: => Any): CorsSettings
    Implicit
    This member is added by an implicit conversion from CorsSettings toEnsuring[CorsSettings] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (CorsSettings) => Boolean): CorsSettings
    Implicit
    This member is added by an implicit conversion from CorsSettings toEnsuring[CorsSettings] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: => Any): CorsSettings
    Implicit
    This member is added by an implicit conversion from CorsSettings toEnsuring[CorsSettings] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): CorsSettings
    Implicit
    This member is added by an implicit conversion from CorsSettings toEnsuring[CorsSettings] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def getAllowedHeaders: Set[String]

    Set of request headers that are allowed when making an actual request.

    Set of request headers that are allowed when making an actual request.

    Controls the content of the Access-Control-Allow-Headers header in a preflight response: If set to a single *, the headers from Access-Control-Request-Headers are echoed. Otherwise specified list of header names is returned as part of the header.

  15. def getAllowedMethods: Set[HttpMethod]

    List of methods allowed when making an actual request.

    List of methods allowed when making an actual request. The listed headers are returned as part of the Access-Control-Allow-Methods preflight response header.

    The preflight request will be rejected if the Access-Control-Request-Method header's method is not part of the list.

  16. def getAllowedOrigins: Set[String]

    List of origins that the CORS filter must allow.

    List of origins that the CORS filter must allow.

    Can also be set to a single * to allow access to the resource from any origin.

    Controls the content of the Access-Control-Allow-Origin response header: if parameter is * and credentials are not allowed, a * is returned in Access-Control-Allow-Origin. Otherwise, the origins given in the Origin request header are echoed.

    Hostname starting with *. will match any sub-domain. The scheme and the port are always strictly matched.

    The actual or preflight request is rejected if any of the origins from the request is not allowed.

  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. def getExposedHeaders: Set[String]

    Set of headers (other than simple response headers) that browsers are allowed to access.

    Set of headers (other than simple response headers) that browsers are allowed to access. If not empty, the listed headers are returned as part of the Access-Control-Expose-Headers header in responses.

  19. def getMaxAge: Duration

    The time the browser is allowed to cache the results of a preflight request.

    The time the browser is allowed to cache the results of a preflight request. This value is returned as part of the Access-Control-Max-Age preflight response header. If java.time.Duration.ZERO, the header is not added to the preflight response.

  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. def withAllowAnyHeader(): CorsSettings
  31. def withAllowAnyOrigin(): CorsSettings
  32. def withAllowCredentials(allow: Boolean): CorsSettings
  33. def withAllowGenericHttpRequests(allow: Boolean): CorsSettings
  34. def withAllowedHeaders(headerNames: Set[String]): CorsSettings
  35. def withAllowedMethods(methods: Set[HttpMethod]): CorsSettings
  36. def withAllowedOrigins(origins: Set[String]): CorsSettings
  37. def withExposedHeaders(headerNames: Set[String]): CorsSettings

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from CorsSettings toStringFormat[CorsSettings] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (CorsSettings, B)
    Implicit
    This member is added by an implicit conversion from CorsSettings toArrowAssoc[CorsSettings] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromCorsSettings to any2stringadd[CorsSettings]

Inherited by implicit conversion StringFormat fromCorsSettings to StringFormat[CorsSettings]

Inherited by implicit conversion Ensuring fromCorsSettings to Ensuring[CorsSettings]

Inherited by implicit conversion ArrowAssoc fromCorsSettings to ArrowAssoc[CorsSettings]

Ungrouped