HttpRouteCorsPolicy class

The Specification for allowing client side cross-origin requests.

Constructors

HttpRouteCorsPolicy({Input<bool>? allowCredentials, Input<List<String>>? allowHeaders, Input<List<String>>? allowMethods, Input<List<String>>? allowOriginRegexes, Input<List<String>>? allowOrigins, Input<bool>? disabled, Input<List<String>>? exposeHeaders, Input<String>? maxAge})
Creates a new HttpRouteCorsPolicy. allowCredentials 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 value is false. allowHeaders Specifies the content for Access-Control-Allow-Headers header. allowMethods Specifies the content for Access-Control-Allow-Methods header. allowOriginRegexes Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax. allowOrigins Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes. disabled If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. exposeHeaders Specifies the content for Access-Control-Expose-Headers header. maxAge Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
const
HttpRouteCorsPolicy.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 translates to the Access-Control-Allow-Credentials header. Default value is false.
final
allowHeaders → Input<List<String>>?
Specifies the content for Access-Control-Allow-Headers header.
final
allowMethods → Input<List<String>>?
Specifies the content for Access-Control-Allow-Methods header.
final
allowOriginRegexes → Input<List<String>>?
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
final
allowOrigins → Input<List<String>>?
Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
final
disabled → Input<bool>?
If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
final
exposeHeaders → Input<List<String>>?
Specifies the content for Access-Control-Expose-Headers header.
final
hashCode → int
The hash code for this object.
no setterinherited
maxAge → Input<String>?
Specifies how long result of a preflight request can be cached in seconds. This 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