Skip to content

Commit

Permalink
docs: fixed incorrect server.proxy example (#1394)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcd authored Jan 6, 2021
1 parent 39f2002 commit 7a9aba5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,16 @@ export default ({ command, mode }) => {

```js
export default {
proxy: {
// string shorthand
'/foo': 'http://localhost:4567/foo',
// with options
'/api': {
target: 'http://jsonplaceholder.typicode.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
server: {
proxy: {
// string shorthand
'/foo': 'http://localhost:4567/foo',
// with options
'/api': {
target: 'http://jsonplaceholder.typicode.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
}
Expand Down

0 comments on commit 7a9aba5

Please sign in to comment.