class Google::Apis::ComputeV1::CorsPolicy

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing

Attributes

allow_credentials[RW]

In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Default is false. Corresponds to the JSON property `allowCredentials` @return [Boolean]

allow_credentials?[RW]

In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Default is false. Corresponds to the JSON property `allowCredentials` @return [Boolean]

allow_headers[RW]

Specifies the content for the Access-Control-Allow-Headers header. Corresponds to the JSON property `allowHeaders` @return [Array<String>]

allow_methods[RW]

Specifies the content for the Access-Control-Allow-Methods header. Corresponds to the JSON property `allowMethods` @return [Array<String>]

allow_origin_regexes[RW]

Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see github.com/google/re2/wiki/Syntax An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Corresponds to the JSON property `allowOriginRegexes` @return [Array<String>]

allow_origins[RW]

Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Corresponds to the JSON property `allowOrigins` @return [Array<String>]

disabled[RW]

If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. Corresponds to the JSON property `disabled` @return [Boolean]

disabled?[RW]

If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. Corresponds to the JSON property `disabled` @return [Boolean]

expose_headers[RW]

Specifies the content for the Access-Control-Expose-Headers header. Corresponds to the JSON property `exposeHeaders` @return [Array<String>]

max_age[RW]

Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. Corresponds to the JSON property `maxAge` @return [Fixnum]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/compute_v1/classes.rb, line 4950
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/compute_v1/classes.rb, line 4955
def update!(**args)
  @allow_credentials = args[:allow_credentials] if args.key?(:allow_credentials)
  @allow_headers = args[:allow_headers] if args.key?(:allow_headers)
  @allow_methods = args[:allow_methods] if args.key?(:allow_methods)
  @allow_origin_regexes = args[:allow_origin_regexes] if args.key?(:allow_origin_regexes)
  @allow_origins = args[:allow_origins] if args.key?(:allow_origins)
  @disabled = args[:disabled] if args.key?(:disabled)
  @expose_headers = args[:expose_headers] if args.key?(:expose_headers)
  @max_age = args[:max_age] if args.key?(:max_age)
end