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.


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

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.


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

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.


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

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 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, see regular expression 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.


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

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


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

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.


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

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.


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

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.


5112
5113
5114
5115
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 5112

class CorsPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end
We're moving! Starting in November, 2022, this page will redirect to its new home. Learn more about it in our blog post: Productivity unlocked with new Cloud SDK reference docs.
DISMISS