Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::CorsPolicy (v2.8.0)

Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::CorsPolicy.

The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard.

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 field 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 field 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 field 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 a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.

#allow_origin_regexes=

def allow_origin_regexes=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Returns
  • (::Array<::String>) — Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.

#allow_origins

def allow_origins() -> ::Array<::String>
Returns
  • (::Array<::String>) — Specifies the list of origins that is 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 is 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 is 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, the setting 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, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
Returns
  • (::Boolean) — If true, the setting 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 field 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 field translates to the Access-Control-Max-Age header.
Returns
  • (::Integer) — Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.