case class CORSConfig(allowedOrigin: AllowedOrigin, allowedCredentials: AllowedCredentials, allowedMethods: AllowedMethods, allowedHeaders: AllowedHeaders, exposedHeaders: ExposedHeaders, maxAge: MaxAge, preflightResponseStatusCode: StatusCode) extends Product with Serializable
- Alphabetic
- By Inheritance
- CORSConfig
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CORSConfig(allowedOrigin: AllowedOrigin, allowedCredentials: AllowedCredentials, allowedMethods: AllowedMethods, allowedHeaders: AllowedHeaders, exposedHeaders: ExposedHeaders, maxAge: MaxAge, preflightResponseStatusCode: StatusCode)
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
- def allowAllHeaders: CORSConfig
Allows CORS requests with any headers.
Allows CORS requests with any headers.
Sets the
Access-Control-Allow-Headersresponse header to* - def allowAllMethods: CORSConfig
Allows CORS requests using any method.
Allows CORS requests using any method.
Sets the
Access-Control-Allow-Methodsresponse header to* - def allowAllOrigins: CORSConfig
Allows CORS requests from any origin.
Allows CORS requests from any origin.
Sets the
Access-Control-Allow-Originresponse header to*. - def allowCredentials: CORSConfig
Allows credentialed requests by setting the
Access-Control-Allow-Credentialsresponse header totrue - def allowHeaders(headerNames: String*): CORSConfig
Allows CORS requests using specific headers.
Allows CORS requests using specific headers.
If the preflight request's
Access-Control-Request-Headersheader requests one of the specifiedheaders, theAccess-Control-Allow-Headersresponse header is set to a comma-separated list of the givenheaders. Otherwise theAccess-Control-Allow-Headersresponse header is suppressed. - def allowMatchingOrigins(predicate: (String) => Boolean): CORSConfig
Allows CORS requests from origins matching predicate
Allows CORS requests from origins matching predicate
If the request
Originheader matches the givenpredicate, sets theAccess-Control-Allow-Originresponse header to the givenorigin. Otherwise theAccess-Control-Allow-Originresponse header is suppressed. - def allowMethods(methods: Method*): CORSConfig
Allows CORS requests using specific methods.
Allows CORS requests using specific methods.
If the preflight request's
Access-Control-Request-Methodheader requests one of the specifiedmethods, theAccess-Control-Allow-Methodsresponse header is set to a comma-separated list of the givenmethods. Otherwise theAccess-Control-Allow-Methodsresponse header is suppressed. - def allowOrigin(origin: Origin): CORSConfig
Allows CORS requests only from a specific origin.
Allows CORS requests only from a specific origin.
If the request
Originmatches the givenorigin, sets theAccess-Control-Allow-Originresponse header to the givenorigin. Otherwise theAccess-Control-Allow-Originresponse header is suppressed. - val allowedCredentials: AllowedCredentials
- val allowedHeaders: AllowedHeaders
- val allowedMethods: AllowedMethods
- val allowedOrigin: AllowedOrigin
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def defaultMaxAge: CORSConfig
Determines how long the response to a preflight request can be cached by the client.
Determines how long the response to a preflight request can be cached by the client.
Suppresses the
Access-Control-Max-Ageresponse header, which makes the client use its default value. - def defaultPreflightResponseStatusCode: CORSConfig
Sets the response status code of successful preflight requests to "204 No Content"
- def denyCredentials: CORSConfig
Blocks credentialed requests by suppressing the
Access-Control-Allow-Credentialsresponse header - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def exposeAllHeaders: CORSConfig
Exposes all response headers to JavaScript in browsers
Exposes all response headers to JavaScript in browsers
Sets the
Access-Control-Expose-Headersresponse header to* - def exposeHeaders(headerNames: String*): CORSConfig
Exposes specific response headers to JavaScript in browsers
Exposes specific response headers to JavaScript in browsers
Sets the
Access-Control-Expose-Headersresponse header to a comma-separated list of the givenheaderNames - def exposeNoHeaders: CORSConfig
Exposes no response headers to JavaScript in browsers
Exposes no response headers to JavaScript in browsers
Suppresses the
Access-Control-Expose-Headersresponse header - val exposedHeaders: ExposedHeaders
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def maxAge(duration: Duration): CORSConfig
Determines how long the response to a preflight request can be cached by the client.
Determines how long the response to a preflight request can be cached by the client.
Sets the
Access-Control-Max-Ageresponse header to the givendurationin seconds. - val maxAge: MaxAge
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def preflightResponseStatusCode(statusCode: StatusCode): CORSConfig
Sets the response status code of successful preflight requests to the given
statusCode - val preflightResponseStatusCode: StatusCode
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def reflectHeaders: CORSConfig
Allows CORS requests using any headers requested in preflight request's
Access-Control-Request-Headersheader.Allows CORS requests using any headers requested in preflight request's
Access-Control-Request-Headersheader.Use reflectHeaders instead of allowAllHeaders when credentialed requests are enabled with allowCredentials, since wildcards are illegal when credentials are enabled
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated