Class CorsSettings

java.lang.Object
org.apache.pekko.http.cors.javadsl.settings.CorsSettings
Direct Known Subclasses:
CorsSettings

public abstract class CorsSettings extends Object
Public API but not intended for subclassing
  • Constructor Details

    • CorsSettings

      public CorsSettings()
  • Method Details

    • create

      public static CorsSettings create(com.typesafe.config.Config config)
      Creates an instance of settings using the given Config.
      Parameters:
      config - (undocumented)
      Returns:
      (undocumented)
    • create

      public static CorsSettings create(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).
      Parameters:
      configOverrides - (undocumented)
      Returns:
      (undocumented)
    • create

      public static CorsSettings create(org.apache.pekko.actor.ActorSystem system)
      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

      public abstract HttpOriginMatcher getAllowedOrigins()
    • getAllowedHeaders

      public abstract HttpHeaderRange getAllowedHeaders()
    • getAllowedMethods

      public abstract Iterable<HttpMethod> getAllowedMethods()
    • getExposedHeaders

      public abstract Iterable<String> getExposedHeaders()
    • getMaxAge

      public abstract OptionalLong getMaxAge()
    • withAllowGenericHttpRequests

      public abstract CorsSettings withAllowGenericHttpRequests(boolean newValue)
    • withAllowCredentials

      public abstract CorsSettings withAllowCredentials(boolean newValue)
    • withAllowedOrigins

      public abstract CorsSettings withAllowedOrigins(HttpOriginMatcher newValue)
    • withAllowedHeaders

      public abstract CorsSettings withAllowedHeaders(HttpHeaderRange newValue)
    • withAllowedMethods

      public abstract CorsSettings withAllowedMethods(Iterable<HttpMethod> newValue)
    • withExposedHeaders

      public abstract CorsSettings withExposedHeaders(Iterable<String> newValue)
    • withMaxAge

      public abstract CorsSettings withMaxAge(OptionalLong newValue)