Skip to content

Instantly share code, notes, and snippets.

@rifttech
Created January 10, 2019 08:18
Show Gist options
  • Select an option

  • Save rifttech/6504526eb7b1975ee8ac334b4724ecf4 to your computer and use it in GitHub Desktop.

Select an option

Save rifttech/6504526eb7b1975ee8ac334b4724ecf4 to your computer and use it in GitHub Desktop.
vue cli 3+, cors, devserver, sockjs error
// vue.config.js
module.exports = {
// options...
devServer: {
host: 'localhost',
port: 8080,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment