DEV Community

Discussion on: Setting up Vue and Phoenix 1.5 with vue-cli

Collapse
 
dyeprey profile image
Jeffrey Valdehueza • Edited

Thanks Alex! How did you solve the CSRF?

Collapse
 
mcraealex profile image
Alexander McRae

Disclaimer: I am not a security expert.

You should be able to put a csrf token in a cookie and then send it back to the server with each request from JavaScript. It may be easier to wrap the fetch function or use axios to do this.