public abstract class CorsSettings
extends java.lang.Object
Constructor and Description |
---|
CorsSettings() |
Modifier and Type | Method and Description |
---|---|
static CorsSettings |
create(org.apache.pekko.actor.ActorSystem system)
Creates an instance of CorsSettings using the configuration provided by the given ActorSystem.
|
static CorsSettings |
create(com.typesafe.config.Config config)
Creates an instance of settings using the given Config.
|
static CorsSettings |
create(java.lang.String configOverrides)
Creates an instance of settings using the given String of config overrides to override settings set in the class
loader of this class (i.e. by application.conf or reference.conf files in the class loader of this class).
|
static CorsSettings |
defaultSettings()
Deprecated.
Use other CorsSettings constructors. Since 1.0.0.
|
abstract boolean |
getAllowCredentials() |
abstract HttpHeaderRange |
getAllowedHeaders() |
abstract java.lang.Iterable<HttpMethod> |
getAllowedMethods() |
abstract HttpOriginMatcher |
getAllowedOrigins() |
abstract boolean |
getAllowGenericHttpRequests() |
abstract java.lang.Iterable<java.lang.String> |
getExposedHeaders() |
abstract java.util.OptionalLong |
getMaxAge() |
abstract CorsSettings |
withAllowCredentials(boolean newValue) |
abstract CorsSettings |
withAllowedHeaders(HttpHeaderRange newValue) |
abstract CorsSettings |
withAllowedMethods(java.lang.Iterable<HttpMethod> newValue) |
abstract CorsSettings |
withAllowedOrigins(HttpOriginMatcher newValue) |
abstract CorsSettings |
withAllowGenericHttpRequests(boolean newValue) |
abstract CorsSettings |
withExposedHeaders(java.lang.Iterable<java.lang.String> newValue) |
abstract CorsSettings |
withMaxAge(java.util.OptionalLong newValue) |
public static CorsSettings create(com.typesafe.config.Config config)
config
- (undocumented)public static CorsSettings create(java.lang.String configOverrides)
configOverrides
- (undocumented)public static CorsSettings create(org.apache.pekko.actor.ActorSystem system)
system
- (undocumented)public static CorsSettings defaultSettings()
apply()
methods
instead to have more control over the source of the configuration.public abstract boolean getAllowGenericHttpRequests()
public abstract boolean getAllowCredentials()
public abstract HttpOriginMatcher getAllowedOrigins()
public abstract HttpHeaderRange getAllowedHeaders()
public abstract java.lang.Iterable<HttpMethod> getAllowedMethods()
public abstract java.lang.Iterable<java.lang.String> getExposedHeaders()
public abstract java.util.OptionalLong getMaxAge()
public abstract CorsSettings withAllowGenericHttpRequests(boolean newValue)
public abstract CorsSettings withAllowCredentials(boolean newValue)
public abstract CorsSettings withAllowedOrigins(HttpOriginMatcher newValue)
public abstract CorsSettings withAllowedHeaders(HttpHeaderRange newValue)
public abstract CorsSettings withAllowedMethods(java.lang.Iterable<HttpMethod> newValue)
public abstract CorsSettings withExposedHeaders(java.lang.Iterable<java.lang.String> newValue)
public abstract CorsSettings withMaxAge(java.util.OptionalLong newValue)