I have had this problem for nearly 2 days, any help would be a life saver.
I have my vue app running on 8080 dev mode and I am trying to integrate blockstack login and that app tries to read http://localhost/manifest.json, so I placed it in static directory, but it is throwing me cors error, do we have solution for that vue cli configurations like vue.config.js?
You can edit this file directly with your editor of choice to change the saved options. You can also use the vue config command to inspect or modify the global CLI config.
The "correct answer" doesn't actually help in this instance.
Blockstack needs to be able to hit the manifest.json
file (in this case localhost:8080/manifest.json
). When the server doesn't support CORS Blockstack will throw an error.
What the OP is asking is how to make "vue-cli-service serve" allow COR requests to happen. To do this, we need to modify Webpack's dev server to allow the CORS request.
Add vue.config.js
(if it doesn't already exist)
module.exports = {
configureWebpack: {
devServer: {
headers: { "Access-Control-Allow-Origin": "*" }
}
}
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With