CorsPolicyComputeBeta class
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.
Constructors
-
CorsPolicyComputeBeta({Input<
bool> ? allowCredentials, Input<List< ? allowHeaders, Input<String> >List< ? allowMethods, Input<String> >List< ? allowOriginRegexes, Input<String> >List< ? allowOrigins, Input<String> >bool> ? disabled, Input<List< ? exposeHeaders, Input<String> >int> ? maxAge}) -
Creates a new CorsPolicyComputeBeta.
allowCredentialsIn 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.allowHeadersSpecifies the content for the Access-Control-Allow-Headers header.allowMethodsSpecifies the content for the Access-Control-Allow-Methods header.allowOriginRegexesSpecifies 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.allowOriginsSpecifies 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.disabledIf true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.exposeHeadersSpecifies the content for the Access-Control-Expose-Headers header.maxAgeSpecifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.const -
CorsPolicyComputeBeta.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
allowCredentials
→ Input<
bool> ? -
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.
final
-
allowHeaders
→ Input<
List< ?String> > -
Specifies the content for the Access-Control-Allow-Headers header.
final
-
allowMethods
→ Input<
List< ?String> > -
Specifies the content for the Access-Control-Allow-Methods header.
final
-
allowOriginRegexes
→ Input<
List< ?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.
final
-
allowOrigins
→ Input<
List< ?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.
final
-
disabled
→ Input<
bool> ? -
If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
final
-
exposeHeaders
→ Input<
List< ?String> > -
Specifies the content for the Access-Control-Expose-Headers header.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
maxAge
→ Input<
int> ? -
Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited