abstract class CorsSettings extends javadsl.settings.CorsSettings
Settings used by the CORS directives.
Public API but not intended for subclassing.
- Alphabetic
- By Inheritance
- CorsSettings
- CorsSettings
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new CorsSettings()
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
-
abstract
def
withAllowCredentials(newValue: Boolean): javadsl.settings.CorsSettings
- Definition Classes
- CorsSettings
-
abstract
def
withAllowGenericHttpRequests(newValue: Boolean): javadsl.settings.CorsSettings
- Definition Classes
- CorsSettings
-
abstract
def
withAllowedHeaders(newValue: HttpHeaderRange): javadsl.settings.CorsSettings
- Definition Classes
- CorsSettings
-
abstract
def
withAllowedMethods(newValue: Iterable[HttpMethod]): javadsl.settings.CorsSettings
- Definition Classes
- CorsSettings
-
abstract
def
withAllowedOrigins(newValue: HttpOriginRange): javadsl.settings.CorsSettings
- Definition Classes
- CorsSettings
-
abstract
def
withExposedHeaders(newValue: Iterable[String]): javadsl.settings.CorsSettings
- Definition Classes
- CorsSettings
-
abstract
def
withMaxAge(newValue: Optional[Long]): javadsl.settings.CorsSettings
- Definition Classes
- CorsSettings
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( ... )
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )