class Google::Apis::ComputeV1::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.
Attributes
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. Corresponds to the JSON property `allowCredentials` @return [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. Corresponds to the JSON property `allowCredentials` @return [Boolean]
Specifies the content for the Access-Control-Allow-Headers header. Corresponds to the JSON property `allowHeaders` @return [Array<String>]
Specifies the content for the Access-Control-Allow-Methods header. Corresponds to the JSON property `allowMethods` @return [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. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. Corresponds to the JSON property `allowOriginRegexes` @return [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. Corresponds to the JSON property `allowOrigins` @return [Array<String>]
If true, the setting 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]
If true, the setting 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]
Specifies the content for the Access-Control-Expose-Headers header. Corresponds to the JSON property `exposeHeaders` @return [Array<String>]
Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header. Corresponds to the JSON property `maxAge` @return [Fixnum]
Public Class Methods
# File lib/google/apis/compute_v1/classes.rb, line 5577 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/compute_v1/classes.rb, line 5582 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