Closed
Description
Hello,
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