HttpRouteCorsPolicyResponse constructor

const HttpRouteCorsPolicyResponse({
  1. required Input<bool> allowCredentials,
  2. required Input<List<String>> allowHeaders,
  3. required Input<List<String>> allowMethods,
  4. required Input<List<String>> allowOriginRegexes,
  5. required Input<List<String>> allowOrigins,
  6. required Input<bool> disabled,
  7. required Input<List<String>> exposeHeaders,
  8. required Input<String> maxAge,
})

Creates a new HttpRouteCorsPolicyResponse. 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.

Implementation

const HttpRouteCorsPolicyResponse({
  required this.allowCredentials,
  required this.allowHeaders,
  required this.allowMethods,
  required this.allowOriginRegexes,
  required this.allowOrigins,
  required this.disabled,
  required this.exposeHeaders,
  required this.maxAge,
});