From 656baf45bdb486444887819c91f6e4ed450d8fe4 Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Fri, 16 Nov 2018 16:49:05 +0100 Subject: [PATCH] Update devServer.proxy documentation 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 --- docs/config/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index b8af776324..3f42cd58d1 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -330,12 +330,12 @@ module.exports = { module.exports = { devServer: { proxy: { - '/api': { + '^/api': { target: '', ws: true, changeOrigin: true }, - '/foo': { + '^/foo': { target: '' } }