Class Google::Cloud::Compute::V1::CorsPolicy (v1.0.0)

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#allow_credentials

def allow_credentials() -> ::Boolean
Returns
  • (::Boolean) — In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default is false.

#allow_credentials=

def allow_credentials=(value) -> ::Boolean
Parameter
  • value (::Boolean) — In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default is false.
Returns
  • (::Boolean) — In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default is false.

#allow_headers

def allow_headers() -> ::Array<::String>
Returns
  • (::Array<::String>) — Specifies the content for the Access-Control-Allow-Headers header.

#allow_headers=

def allow_headers=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Specifies the content for the Access-Control-Allow-Headers header.
Returns
  • (::Array<::String>) — Specifies the content for the Access-Control-Allow-Headers header.

#allow_methods

def allow_methods() -> ::Array<::String>
Returns
  • (::Array<::String>) — Specifies the content for the Access-Control-Allow-Methods header.

#allow_methods=

def allow_methods=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Specifies the content for the Access-Control-Allow-Methods header.
Returns
  • (::Array<::String>) — Specifies the content for the Access-Control-Allow-Methods header.

#allow_origin_regexes

def allow_origin_regexes() -> ::Array<::String>
Returns
  • (::Array<::String>) — Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see github.com/google/re2/wiki/Syntax An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

#allow_origin_regexes=

def allow_origin_regexes=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see github.com/google/re2/wiki/Syntax An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
Returns
  • (::Array<::String>) — Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see github.com/google/re2/wiki/Syntax An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

#allow_origins

def allow_origins() -> ::Array<::String>
Returns
  • (::Array<::String>) — Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

#allow_origins=

def allow_origins=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
Returns
  • (::Array<::String>) — Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

#disabled

def disabled() -> ::Boolean
Returns
  • (::Boolean) — If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.

#disabled=

def disabled=(value) -> ::Boolean
Parameter
  • value (::Boolean) — If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
Returns
  • (::Boolean) — If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.

#expose_headers

def expose_headers() -> ::Array<::String>
Returns
  • (::Array<::String>) — Specifies the content for the Access-Control-Expose-Headers header.

#expose_headers=

def expose_headers=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Specifies the content for the Access-Control-Expose-Headers header.
Returns
  • (::Array<::String>) — Specifies the content for the Access-Control-Expose-Headers header.

#max_age

def max_age() -> ::Integer
Returns
  • (::Integer) — Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.

#max_age=

def max_age=(value) -> ::Integer
Parameter
  • value (::Integer) — Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Returns
  • (::Integer) — Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.