CORS configuration template

Content Platform Tenant Management Help

Version
9.7.x
File Size
4269 KB
Audience
anonymous
Part Number
MK-95HCPH002-19

Here is a sample XML template for setting a CORS rules configuration.

<CORSConfiguration>
     <CORSRule>
          <Id>Optional: Unique string value that identifies the rule</Id>
          <AllowedOrigin>Origin that you want to allow cross-origin requests from</AllowedOrigin>
          <AllowedOrigin>A single wildcard is allowed</AllowedOrigin>
          <AllowedMethod>HTTP method</AllowedMethod>
          <AllowedMethod>HTTP method</AllowedMethod>
          <MaxAgeSeconds>Optional: Time, in seconds, the browser can cache the preflight OPTIONS response for a resource</MaxAgeSeconds>
          <AllowedHeader>Optional: Header that you want the browser to send. A single wildcard is allowed.</AllowedHeader>
          <AllowedHeader>...</AllowedHeader>     <!-- Optional -->
          <ExposeHeader>Optional: Response header that you want accessible from the browser </ExposeHeader>
          <ExposeHeader>...</ExposeHeader>     <!-- Optional -->
     </CORSRule>
     <CORSRule>
          ...
     </CORSRule>
     <CORSRule>
          ...
     </CORSRule>
</CORSConfiguration>