Skip to content

Commit ea312cf

Browse files
binarinhaoqunjiang
authored andcommitted
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 - https://github.com/binarin/vue-cli/blob/5786e273b2e133c836f53f4ab5c1d8d65f9766f5/packages/%40vue/cli-service/lib/util/prepareProxy.js#L69
1 parent 481e713 commit ea312cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/config/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,12 @@ module.exports = {
330330
module.exports = {
331331
devServer: {
332332
proxy: {
333-
'/api': {
333+
'^/api': {
334334
target: '<url>',
335335
ws: true,
336336
changeOrigin: true
337337
},
338-
'/foo': {
338+
'^/foo': {
339339
target: '<other_url>'
340340
}
341341
}

0 commit comments

Comments
 (0)