Class Cors.Builder

java.lang.Object
com.google.cloud.storage.Cors.Builder
Enclosing class:
Cors

public static final class Cors.Builder extends Object
CORS configuration builder.
  • Method Details

    • setMaxAgeSeconds

      public Cors.Builder setMaxAgeSeconds(Integer maxAgeSeconds)
      Sets the max time in seconds in which a client can issue requests before sending a new preflight request.
    • setMethods

      public Cors.Builder setMethods(Iterable<HttpMethod> methods)
      Sets the HTTP methods supported by this CORS configuration.
    • setOrigins

      public Cors.Builder setOrigins(Iterable<Cors.Origin> origins)
      Sets the origins for this CORS configuration.
    • setResponseHeaders

      public Cors.Builder setResponseHeaders(Iterable<String> headers)
      Sets the response headers supported by this CORS configuration.
    • build

      public Cors build()
      Creates a CORS configuration.