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-
(::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-
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.
-
(::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>- (::Array<::String>) — Specifies the content for the Access-Control-Allow-Headers header.
#allow_headers=
def allow_headers=(value) -> ::Array<::String>- value (::Array<::String>) — Specifies the content for the Access-Control-Allow-Headers header.
- (::Array<::String>) — Specifies the content for the Access-Control-Allow-Headers header.
#allow_methods
def allow_methods() -> ::Array<::String>- (::Array<::String>) — Specifies the content for the Access-Control-Allow-Methods header.
#allow_methods=
def allow_methods=(value) -> ::Array<::String>- value (::Array<::String>) — Specifies the content for the Access-Control-Allow-Methods header.
- (::Array<::String>) — Specifies the content for the Access-Control-Allow-Methods header.
#allow_origin_regexes
def allow_origin_regexes() -> ::Array<::String>-
(::Array<::String>) — Specifies a regular expression that matches allowed origins. For
more information, see regular expression syntax.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
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>-
value (::Array<::String>) — Specifies a regular expression that matches allowed origins. For
more information, see regular expression syntax.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
-
(::Array<::String>) — Specifies a regular expression that matches allowed origins. For
more information, see regular expression syntax.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
#allow_origins
def allow_origins() -> ::Array<::String>-
(::Array<::String>) — Specifies the list of origins that is allowed to do CORS requests.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
#allow_origins=
def allow_origins=(value) -> ::Array<::String>-
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 inallowOrigins or an item inallowOriginRegexes.
-
(::Array<::String>) — Specifies the list of origins that is allowed to do CORS requests.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
#disabled
def disabled() -> ::Boolean- (::Boolean) — If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.
#disabled=
def disabled=(value) -> ::Boolean- value (::Boolean) — If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.
- (::Boolean) — If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.
#expose_headers
def expose_headers() -> ::Array<::String>- (::Array<::String>) — Specifies the content for the Access-Control-Expose-Headers header.
#expose_headers=
def expose_headers=(value) -> ::Array<::String>- value (::Array<::String>) — Specifies the content for the Access-Control-Expose-Headers header.
- (::Array<::String>) — Specifies the content for the Access-Control-Expose-Headers header.
#max_age
def max_age() -> ::Integer- (::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- 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.
- (::Integer) — Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.