From e49773370179dc314bb434164a336da77d2ed472 Mon Sep 17 00:00:00 2001 From: Bogdan Luca Date: Thu, 17 Jan 2019 12:28:51 +0200 Subject: [PATCH] docs(proxy): add warning when proxy set as string (fix #3308) --- docs/config/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/config/README.md b/docs/config/README.md index 96560b8511..7608b0b75e 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -328,6 +328,10 @@ Deprecated since Vue CLI 3.3, please use [`publicPath`](#publicPath) instead. This will tell the dev server to proxy any unknown requests (requests that did not match a static file) to `http://localhost:4000`. + ::: warning + When `devServer.proxy` is set to a string, only XHR requests will be proxied. If you want to test an API URL, don't open it in the browser, use an API tool like Postman instead. + ::: + If you want to have more control over the proxy behavior, you can also use an object with `path: options` pairs. Consult [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware#proxycontext-config) for full options: ``` js