title: How to allow multiple origin domains by Access-Control-Allow-Origin in web.config file?
body: <p>Is there anyway to allow multiple cross-domains using Access-Control-Allow-Origin in the web.config file?</p>
  
  <p>Currently I am using <code>*</code> to allow multiple domains at once.</p>
  
  <pre><code>&lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
  </code></pre>
  
  <p>But I don't want to use <code>*</code> because it's open for all domains and I only want to allow some specific domains.</p>
  
  <p>So,there anyway to allow multiple cross-domains using the Access-Control-Allow-Origin in web.config file?</p>
  
  <p>I found some related posts:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/17323350/iis-access-control-allow-origin-with-multiple-domains">Access-control-allow-origin with multiple domains</a></li>
  <li><a href="https://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains/4110601#4110601">Access-Control-Allow-Origin Multiple Origin Domains?</a></li>
  </ul>
  
  <p>I already tried to get the request header to validate the request origin <strong>(As suggested in post 1)</strong> but was unsuccessful. Because I am using an iframe element, when I try to get the request header, it provides the origin (domain) of the iframe. But here I want the original (parent window) origin (domain).</p>