You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use 'https://www.npmjs.com/package/body-parser' you should declare it AFTER the proxy configuration, otherwise original 'POST' body could be modified and not proxied correctly.
79
79
80
-
```
81
-
82
-
app.use('/proxy', 'http://foo.bar.com')
80
+
```js
81
+
app.use('/proxy', proxy('http://foo.bar.com'))
83
82
84
83
// Declare use of body-parser AFTER the use of proxy
85
84
app.use(bodyParser.foo(bar))
86
85
app.use('/api', ...)
87
86
```
88
87
88
+
If this cannot be avoided and you MUST proxy after `body-parser` has been registered, set `parseReqBody` to `false` and explicitly specify the body you wish to send in `proxyReqBodyDecorator`.
0 commit comments