abstract class CorsSettings extends javadsl.settings.CorsSettings
Settings used by the CORS directives.
Public API but not intended for subclassing.
- Self Type
- CorsSettingsImpl
- Annotations
- @DoNotInherit()
- Alphabetic
- By Inheritance
- CorsSettings
- CorsSettings
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def allowCredentials: Boolean
Indicates whether the resource supports user credentials.
Indicates whether the resource supports user credentials. If
true, the headerAccess-Control-Allow-Credentialsis set in the response, indicating that the actual request can include user credentials. Examples of user credentials are: cookies, HTTP authentication or client-side certificates.Default:
true- See also
- abstract def allowGenericHttpRequests: Boolean
If
true, allow generic requests (that are outside the scope of the specification) to pass through the directive.If
true, allow generic requests (that are outside the scope of the specification) to pass through the directive. Else, strict CORS filtering is applied and any invalid request will be rejected.Default:
true - abstract def allowedHeaders: HttpHeaderRange
List of request headers that can be used when making an actual request.
List of request headers that can be used when making an actual request. Controls the content of the
Access-Control-Allow-Headersheader in a preflight response: if parameter is*, the headers fromAccess-Control-Request-Headersare echoed. Otherwise the parameter list is returned as part of the header.Default:
HttpHeaderRange.*- See also
- abstract def allowedMethods: Seq[HttpMethod]
List of methods that can be used when making an actual request.
List of methods that can be used when making an actual request. The list is returned as part of the
Access-Control-Allow-Methodspreflight response header.The preflight request will be rejected if the
Access-Control-Request-Methodheader's method is not part of the list.Default:
Seq(GET, POST, HEAD, OPTIONS)- See also
- abstract def allowedOrigins: HttpOriginRange
List of origins that the CORS filter must allow.
List of origins that the CORS filter must allow. Can also be set to
*to allow access to the resource from any origin. Controls the content of theAccess-Control-Allow-Originresponse header: if parameter is*and credentials are not allowed, a*is set inAccess-Control-Allow-Origin. Otherwise, the origins given in theOriginrequest header are echoed.The actual or preflight request is rejected if any of the origins from the request is not allowed.
Default:
HttpOriginRange.*- See also
- abstract def exposedHeaders: Seq[String]
List of headers (other than simple response headers) that browsers are allowed to access.
List of headers (other than simple response headers) that browsers are allowed to access. If not empty, this list is returned as part of the
Access-Control-Expose-Headersheader in the actual response.Default:
Seq.empty - abstract def maxAge: Option[Long]
When set, the amount of seconds the browser is allowed to cache the results of a preflight request.
When set, the amount of seconds the browser is allowed to cache the results of a preflight request. This value is returned as part of the
Access-Control-Max-Agepreflight response header. IfNone, the header is not added to the preflight response.Default:
Some(30 * 60)- See also
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.CloneNotSupportedException])
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getAllowCredentials: Boolean
- Definition Classes
- CorsSettings → CorsSettings
- def getAllowGenericHttpRequests: Boolean
- Definition Classes
- CorsSettings → CorsSettings
- def getAllowedHeaders: HttpHeaderRange
- Definition Classes
- CorsSettings → CorsSettings
- def getAllowedMethods: List[HttpMethod]
- Definition Classes
- CorsSettings → CorsSettings
- def getAllowedOrigins: HttpOriginRange
- Definition Classes
- CorsSettings → CorsSettings
- final def getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getExposedHeaders: List[String]
- Definition Classes
- CorsSettings → CorsSettings
- def getMaxAge: Optional[Long]
- Definition Classes
- CorsSettings → CorsSettings
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.InterruptedException])
- def withAllowCredentials(newValue: Boolean): CorsSettings
- Definition Classes
- CorsSettings → CorsSettings
- def withAllowGenericHttpRequests(newValue: Boolean): CorsSettings
- Definition Classes
- CorsSettings → CorsSettings
- def withAllowedHeaders(newValue: HttpHeaderRange): CorsSettings
- def withAllowedHeaders(newValue: HttpHeaderRange): CorsSettings
- Definition Classes
- CorsSettings → CorsSettings
- def withAllowedMethods(newValue: Seq[HttpMethod]): CorsSettings
- def withAllowedMethods(newValue: Iterable[HttpMethod]): CorsSettings
- Definition Classes
- CorsSettings → CorsSettings
- def withAllowedOrigins(newValue: HttpOriginRange): CorsSettings
- def withAllowedOrigins(newValue: HttpOriginRange): CorsSettings
- Definition Classes
- CorsSettings → CorsSettings
- def withExposedHeaders(newValue: Seq[String]): CorsSettings
- def withExposedHeaders(newValue: Iterable[String]): CorsSettings
- Definition Classes
- CorsSettings → CorsSettings
- def withMaxAge(newValue: Option[Long]): CorsSettings
- def withMaxAge(newValue: Optional[Long]): CorsSettings
- Definition Classes
- CorsSettings → CorsSettings