Sailsjs + vuejs + axios + CSRF tokens
问题 i some thing not understand. Always get an error 403. I have a code in frontend(vue.js), here I get a token _csrf from Sails.js, its ok. axios.get('http://localhost:1337/csrfToken') .then(response => { this.$store.commit('csrf_update', response.data._csrf); console.log("_csrf===",response.data._csrf); axios.defaults.headers.post['X-CSRF-Token'] = response.data._csrf; }) And i have a backend sails.js, settings in security.js cors: { allRoutes: true, allowOrigins: 'http://localhost:8080',