title: How to send CSRF header with axios?
body: <p>I am using axios in a Vue environment to talk to a web serivce written in Symfony. Each request needs an <code>X-Auth-Token</code> header to be set. The value is stored in an <code>auth_token</code> cookie.</p>
  
  <p>The axios instance is configured using</p>
  
  <pre><code>xsrfCookieName: 'auth_token',
  xsrfHeaderName: 'X-Auth-Token'
  </code></pre>
  
  <p>but even though <code>document.cookie</code> reveals <code>"auth_token=5e51c7d2..."</code>, the requests sent by axios do not have the <code>X-Auth-Token</code> header set and thus are hitting a <code>403 Forbidden</code>. If I manually set the header, everything works, but I thought the two options are supposed to handle that themselves. Am I doing something wrong? Unfortunately, I cannot provide a fiddle as I am talking to a private API.</p>