Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docusaurus/docs/proxying-api-requests-in-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module.exports = function (app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:5000',
target: 'http://localhost:5000/api',
changeOrigin: true,
})
);
Expand All @@ -113,3 +113,5 @@ module.exports = function (app) {
> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for Flow, ES Modules, etc).

> **Note:** Passing the path to the proxy function allows you to use globbing and/or pattern matching on the path, which is more flexible than the express route matching.

> **Note** When proxy is mounted on a path, this path should be provided in the target.