Proxying to proxy ... how? #551
Replies: 3 comments
-
I would settle for using Fiddler for monitoring the usage of this package. I agree with you there doesn't seem to be enough config since the toProxy is a boolean? |
Beta Was this translation helpful? Give feedback.
-
Here's what I used to forward to OWASP ZAP, using the const express = require('express');
const proxy = require('http-proxy-middleware');
const ProxyAgent = require('http-proxy-agent');
// proxy to chain through (OWASP ZAP)
const proxyUrl = 'http://127.0.0.1:8000';
const app = express();
app.use(proxy({
agent: new ProxyAgent(proxyUrl),
target: 'http://example.com/',
changeOrigin: true,
})); |
Beta Was this translation helpful? Give feedback.
-
@AlbinoDrought I tried your solution to proxy to |
Beta Was this translation helpful? Give feedback.
-
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
proxy middleware configuration
server mounting
Beta Was this translation helpful? Give feedback.
All reactions