Add support for redirection to corporate proxy
See original GitHub issueHello,
I’m working behind a corporate proxy, and I can’t seem to make redirection work through it.
Here is my config:
{
context: '/api',
options: {
pathRewrite: { '^/api' : '' },
target: 'http://api.stuff.com',
changeOrigin: true,
toProxy: 'http://x.x.x.x:8080/'
}
Maybe it’s a misuse of the toProxy
option, but I can’t find a good example usage.
In another hand, it would be nice to make use of the standard http_proxy
and https_proxy
environment variables to make this work automatically without having to fiddle through the config (most node modules use these to work through corporate proxies).
Thanks for your help
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Reverse Proxy and HTTP Redirects - Apache Traffic Server
As a reverse proxy cache, Traffic Server serves requests on behalf of origin servers. Traffic Server is configured in such a way that...
Read more >Redirect request to corporate proxy server with nginx reverse ...
I have a Gentoo linux where I run an application that makes requests to a certain domain, but does not respect my proxy...
Read more >Add a Proxy Server to Redirect Traffic - Skyhigh Security
In Skyhigh CASB, click the Settings icon. · Select Infrastructure | Client Proxy Management. · In the policy tree, select Proxy Servers. ·...
Read more >Configuring the Redirect Server to Support HTTP Proxies ...
Support for proxy requests is an optional feature of the redirect server. If you configure proxy support, you must also have DNS configured....
Read more >Configure reverse proxy redirection | Cache Redirection
Navigate to Traffic Management > Cache Redirection > Map Policies. · In the details pane, click Add. · In the Create Map Policy...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Spent half the day fighting with my corporate proxy, until I found this. Thank you! Works perfectly.
Glad to hear this thread helped you out.
I’ve added a corporate proxy configuration example to the recipes: https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/corporate-proxy.md