CORS issue with Vue.js and Nodejs CORS issue with Vue.js and Nodejs vue.js vue.js

CORS issue with Vue.js and Nodejs


If you use expressjs you can simply use nodejs cors lib to enable CORS in your node server.

I strongly advise you to activate it only for dev purposes :

var cors = require('cors')if (NODE_ENV !== 'production') {   app.use(cors())}