title: haproxy subdomain access for CORS
body: <p>I want to do the equivalent of this in haproxy to allow CORS for any server in my domain. By default CORS only does null, star or a single URL. Is that possible? Here's what works on apache:</p>
  
  <pre><code> SetEnvIf Origin "^(.*\.bebop\.co)$" ORIGIN_SUB_DOMAIN=$1
   Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
  </code></pre>
  
  <p>I've already added the Access-Control-Allow-Credentials and set it to true so just need that one more piece. Thanks much.</p>