Open ghost opened 1 year ago
http-proxy-middleware
Update the ip agent address dynamically on each request, but it didn't work
app.use( '/', createProxyMiddleware({ target: 'https://ip.tool.lu/', changeOrigin: true, followRedirects: true, agent: new HttpsProxyAgent({ proxy: getRandomAgentProxy(), }), onProxyReq: (proxyReq, req, res, options) => { // Update the ip agent address dynamically on each request options.agent = new HttpsProxyAgent({ proxy: getRandomAgentProxy(), }); } }), );
Hope to update the agent ip dynamically
basic express demo.
OS: macOS 13.2.1 Node: 19.5.0
No response
any updates, same issue
same issue
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
Update the ip agent address dynamically on each request, but it didn't work
Step-by-step reproduction instructions
Expected behavior (be clear and concise)
Hope to update the agent ip dynamically
How is http-proxy-middleware used in your project?
What http-proxy-middleware configuration are you using?
What OS/version and node/version are you seeing the problem?
Additional context (optional)
No response