CORSRule.fromXml constructor

CORSRule.fromXml(
  1. XmlElement? xml
)

Implementation

CORSRule.fromXml(XmlElement? xml) {
  allowedHeaders = getProp(xml, 'AllowedHeaders')?.text;
  allowedMethods = getProp(xml, 'AllowedMethods')?.text;
  allowedOrigins = getProp(xml, 'AllowedOrigins')?.text;
  exposeHeaders = getProp(xml, 'ExposeHeaders')?.text;
  maxAgeSeconds = int.tryParse(getProp(xml, 'MaxAgeSeconds')!.text);
}