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
Update the ip agent address dynamically on each request, but it didn't work
Step-by-step reproduction instructions
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(),
});
}
}),
);
Expected behavior (be clear and concise)
Hope to update the agent ip dynamically
How is http-proxy-middleware used in your project?
basic express demo.
What http-proxy-middleware configuration are you using?
app.use('/',createProxyMiddleware({target: 'https://ip.tool.lu/',changeOrigin: true,followRedirects: true,agent: newHttpsProxyAgent({proxy: getRandomAgentProxy(),}),onProxyReq: (proxyReq,req,res,options)=>{// Update the ip agent address dynamically on each requestoptions.agent=newHttpsProxyAgent({proxy: getRandomAgentProxy(),});}}),);
What OS/version and node/version are you seeing the problem?
OS: macOS 13.2.1
Node: 19.5.0
Additional context (optional)
No response
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: