CORSPolicy constructor Null safety

CORSPolicy()

Create a new instance of CORSPolicy.

Values are set to match defaultPolicy.

Implementation

CORSPolicy() {
  final def = defaultPolicy;
  allowedOrigins = List.from(def.allowedOrigins);
  allowCredentials = def.allowCredentials;
  exposedResponseHeaders = List.from(def.exposedResponseHeaders);
  allowedMethods = List.from(def.allowedMethods);
  allowedRequestHeaders = List.from(def.allowedRequestHeaders);
  cacheInSeconds = def.cacheInSeconds;
}