HttpRouteCorsPolicyResponse constructor
- required Input<
bool> allowCredentials, - required Input<
List< allowHeaders,String> > - required Input<
List< allowMethods,String> > - required Input<
List< allowOriginRegexes,String> > - required Input<
List< allowOrigins,String> > - required Input<
bool> disabled, - required Input<
List< exposeHeaders,String> > - 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,
});