title: CSRF protection in singlepage web application
body: <p>My Application structure as follows</p>
  
  <p>1)API server running in api.mydomain.com</p>
  
  <p>2)Frontend VUejs application running in www.mydomain.com</p>
  
  <p>So i implemented authentication via httponly cookie.</p>
  
  <p>But little confused with CSRF token implementation</p>
  
  <p>Mysolution</p>
  
  <p>1).<code>CSRF</code> token from the url like <code>/getCSRF</code>.</p>
  
  <p>2) Store it in localstorage.</p>
  
  <p>3) Send with every request.</p>
  
  <p>But i don't think its the good way does anyone have suggestion?</p>