How to enable CORS on Vue CLI serve
Posted on February 15, 2020
Today I've learned how to enable CORS when using the local webserver of Vue-CLI during development.
Here the tip learned here. Just add or create the vue.config.js
file with:
module.exports = {
configureWebpack: {
devServer: {
headers: { 'Access-Control-Allow-Origin': '*' }
}
}
}