Class CorsSettings
java.lang.Object
org.apache.pekko.http.cors.javadsl.settings.CorsSettings
- Direct Known Subclasses:
CorsSettings
Public API but not intended for subclassing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CorsSettingscreate(com.typesafe.config.Config config) Creates an instance of settings using the given Config.static CorsSettingsCreates 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 CorsSettingscreate(org.apache.pekko.actor.ActorSystem system) Creates an instance of CorsSettings using the configuration provided by the given ActorSystem.abstract booleanabstract HttpHeaderRangeabstract Iterable<HttpMethod>abstract HttpOriginMatcherabstract booleanabstract OptionalLongabstract CorsSettingswithAllowCredentials(boolean newValue) abstract CorsSettingswithAllowedHeaders(HttpHeaderRange newValue) abstract CorsSettingswithAllowedMethods(Iterable<HttpMethod> newValue) abstract CorsSettingswithAllowedOrigins(HttpOriginMatcher newValue) abstract CorsSettingswithAllowGenericHttpRequests(boolean newValue) abstract CorsSettingswithExposedHeaders(Iterable<String> newValue) abstract CorsSettingswithMaxAge(OptionalLong newValue)
-
Constructor Details
-
CorsSettings
public CorsSettings()
-
-
Method Details
-
create
Creates an instance of settings using the given Config.- Parameters:
config- (undocumented)- Returns:
- (undocumented)
-
create
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).- Parameters:
configOverrides- (undocumented)- Returns:
- (undocumented)
-
create
Creates an instance of CorsSettings using the configuration provided by the given ActorSystem.- Parameters:
system- (undocumented)- Returns:
- (undocumented)
-
getAllowGenericHttpRequests
public abstract boolean getAllowGenericHttpRequests() -
getAllowCredentials
public abstract boolean getAllowCredentials() -
getAllowedOrigins
-
getAllowedHeaders
-
getAllowedMethods
-
getExposedHeaders
-
getMaxAge
-
withAllowGenericHttpRequests
-
withAllowCredentials
-
withAllowedOrigins
-
withAllowedHeaders
-
withAllowedMethods
-
withExposedHeaders
-
withMaxAge
-