-
Notifications
You must be signed in to change notification settings - Fork 878
Closed
Description
Expected behavior
I want to have requests between our middleware using Express & http-proxy-middleware to be proxied to another debugging proxy (in this case OWASP ZAP) to be able to easily debug the traffic between middleware and API.
Actual behavior
I am unable to find the correct setup to achieve this. I have activated the toProxy, xvfb and changeOrigin options but have no idea how to actually tell the proxy to proxy via OWASP.
Setup
- http-proxy-middleware: 0.17.4
- server: express 4.16.2
- other relevant modules
proxy middleware configuration
const proxyDefaults = {
target: `${config.api.root}`,
toProxy: true,
xfwb: true,
logLevel: config.loglevel.proxy,
changeOrigin: true,
secure: config.api.secure,
pathRewrite: {
'^/express': '/v2'
},
logProvider: function() {
return logger;
}
};server mounting
router.all('*', authenticationMiddleware, proxy(Object.assign({}, injectAccessToken, proxyDefaults)));
app.use('/express', router);Metadata
Metadata
Assignees
Labels
No labels