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.



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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.



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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.



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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 about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

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.



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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.



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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

#disabled::Boolean

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



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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.



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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.



3889
3890
3891
3892
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 3889

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