title: “Access-Control-Allow-Origin header contains multiple values” error
body: <p>I'm getting mirriad of errors trying to do an <code>ajax</code> call in a reactjs app using axios. I have an <code>api</code> that lives at a subdomain and making calls from the main domain.</p>
  
  <p>.htaccess:</p>
  
  <pre><code>Header add Access-Control-Allow-Origin: "*"
  Header add Access-Control-Allow-Credentials: "true"
  Header add Access-Control-Allow-Methods: "GET,HEAD,OPTIONS,POST,PUT"
  Header add Access-Control-Allow-Headers: "Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers"
  </code></pre>
  
  <p>ajax headers in reactjs (using axios):</p>
  
  <pre><code>var options = {
              method: 'GET',
              url: 'http://admin.mysite.com/menus/5',
              headers: {
                  'Access-Control-Allow-Origin': '*',
                  'Access-Control-Allow-Methods': 'GET,HEAD,OPTIONS,POST,PUT',
                  'Access-Control-Allow-Headers': 'Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers'
              }
          }
  </code></pre>
  
  <p>I've tried making changes to each of these but get different errors. If I have the <code>Header add Access-Control-Allow-Origin: "*"</code> it complains about double origins. If I remove it I I get an error about <code>Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers in preflight response</code> other changes has responded with <code>Access-Control-Allow-Headers is not allowed by Access-Control-Allow-Headers in preflight response</code></p>
  
  <p>I'm using wordpress as a headless CMS and tapping into the restful api to pull the data I need. I have noticed if I removed all of this I can <code>get</code> my data fine but I can't <code>post</code> without fixing the cross domain issues.</p>