mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-06 23:18:28 -06:00
docs: update devServer.proxy documentation (#2968) [ci skip]
So that it'll be obvious that proxies are configured via regexes. Usually it's not noticeable, but the original example becomes problematic when vue-router in history mode is used.
Here is a place where matching happens - 5786e273b2/packages/%40vue/cli-service/lib/util/prepareProxy.js (L69)
This commit is contained in:
committed by
Haoqun Jiang
parent
481e713302
commit
ea312cfe50
@@ -330,12 +330,12 @@ module.exports = {
|
||||
module.exports = {
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
'^/api': {
|
||||
target: '<url>',
|
||||
ws: true,
|
||||
changeOrigin: true
|
||||
},
|
||||
'/foo': {
|
||||
'^/foo': {
|
||||
target: '<other_url>'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user