Skip to content

Commit fbb3b03

Browse files
szabolcs-szilagyiiansu
authored andcommitted
Correct proxy usage docs (#7368)
1 parent 24780bb commit fbb3b03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docusaurus/docs/proxying-api-requests-in-development.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ You can now register proxies as you wish! Here's an example using the above `htt
9696
const proxy = require('http-proxy-middleware');
9797

9898
module.exports = function(app) {
99-
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
99+
app.use('/api', proxy({
100+
target: 'http://localhost:5000',
101+
changeOrigin: true,
102+
}));
100103
};
101104
```
102105

0 commit comments

Comments
 (0)