Class: Google::Cloud::Compute::V1::CorsPolicy

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/compute/v1/compute.rb

Overview

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.

Instance Attribute Summary collapse

Instance Attribute Details

#allow_credentials::Boolean

Returns 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.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#allow_headers::Array<::String>

Returns Specifies the content for the Access-Control-Allow-Headers header.

Returns:

  • (::Array<::String>)

    Specifies the content for the Access-Control-Allow-Headers header.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#allow_methods::Array<::String>

Returns Specifies the content for the Access-Control-Allow-Methods header.

Returns:

  • (::Array<::String>)

    Specifies the content for the Access-Control-Allow-Methods header.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#allow_origin_regexes::Array<::String>

Returns 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.

Returns:

  • (::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.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#allow_origins::Array<::String>

Returns 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.

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 inallowOrigins or an item inallowOriginRegexes.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#disabled::Boolean

Returns If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.

Returns:

  • (::Boolean)

    If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#expose_headers::Array<::String>

Returns Specifies the content for the Access-Control-Expose-Headers header.

Returns:

  • (::Array<::String>)

    Specifies the content for the Access-Control-Expose-Headers header.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#max_age::Integer

Returns 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.



14353
14354
14355
14356
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 14353

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end