Welcome! Log In Create A New Profile

Advanced

how to proxy a proxy (subrequest with corporate proxy)

March 30, 2017 06:13PM
Greetings,

Our custom nginx module implements a number of subrequests (REST calls to other servers to obtain data for our business logic). Everything is working correctly, except one customer requires a corporate HTTP web proxy for the URL (running on a different server) that our subrequests will be hitting. It's not clear to us how to configure a "web proxy" for a subrequest, since the subrequest itself is already basically a "proxy" call.

Our subrequests would look like this:

location /subrequest {
internal;
resolver 127.0.0.1;
proxy_pass http://rest_server/...;
}

We're aware of this kind of thing for the main request... but unclear if/how it applies to subrequests?

http {
upstream corporate_proxy {
server proxy.my.company.net:8080;
}
server {
...
location /custom/main/request/url {
proxy_buffering off;
proxy_pass_header on;
proxy_set_header Host "www.origin-server.com";
proxy_pass http://corporate_proxy;
}
}
}

How would we force the subrequest to use the corporate proxy?

Thanks
Subject Author Posted

how to proxy a proxy (subrequest with corporate proxy)

CeeGeeDev March 30, 2017 06:13PM

Re: how to proxy a proxy (subrequest with corporate proxy)

Francis Daly April 03, 2017 11:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready