CORSRule.fromXml constructor

CORSRule.fromXml(
  1. XmlElement elem
)

Implementation

factory CORSRule.fromXml(_s.XmlElement elem) {
  return CORSRule(
    allowedMethods: _s.extractXmlStringListValues(elem, 'AllowedMethod'),
    allowedOrigins: _s.extractXmlStringListValues(elem, 'AllowedOrigin'),
    allowedHeaders: _s.extractXmlStringListValues(elem, 'AllowedHeader'),
    exposeHeaders: _s.extractXmlStringListValues(elem, 'ExposeHeader'),
    maxAgeSeconds: _s.extractXmlIntValue(elem, 'MaxAgeSeconds'),
  );
}