Skip to content

Instantly share code, notes, and snippets.

@rightson
Created August 7, 2018 08:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightson/7ad12bb8fc5582760eaf8d7f79d437fa to your computer and use it in GitHub Desktop.
Save rightson/7ad12bb8fc5582760eaf8d7f79d437fa to your computer and use it in GitHub Desktop.
vuel-cli 3.x proxy setting (different from 2.x's proxyTable setting)
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:8000/api',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/api': ''
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment