0👍
You can handle CORS with set a proxy in vue config
vue.config.js
module.exports = {
devServer: {
proxy: 'http://localhost:8080',
}
}
-1👍
You should send the header Access-Control-Allow-Origin
in all your responses from the server.
I do not know Laravel pretty well, but it seems that only options are sending this response header.
You can debug this using your browser. Open the network tab and check if your server is sending the response header Access-Control-Allow-Origin
within all requests.
Although this should solve the issue, you should remember that, in production, using a wildcard (*) for CORS is a bad practice and should be replaced by a whitelist when deploying your app
Source:stackexchange.com