Welcome! Log In Create A New Profile

Advanced

Conditionally removing a proxy header

May 12, 2020 03:01PM
I'm trying to conditionally remove a proxy header but this doesn't appear to be allowed using an "if". Ideally it would look something like this where $external_traffic is either 0 or 1:

if ($external_traffic) {
...
proxy_hide_header WWW-Authenticate; # Remove negotiate header
...
}

My workaround is to set up another site with proxy_hide_header set and do a redirect to it inside the if instead but that seems messy.

if ($external_traffic) {
...
rewrite ^ https://external.testdomain.com$request_uri break;
...
}

Is there a better way to do this?

Thanks,
Neil
Subject Author Posted

Conditionally removing a proxy header

eckern May 12, 2020 03:01PM

Re: Conditionally removing a proxy header

Francis Daly May 14, 2020 06:10PM

Re: Conditionally removing a proxy header

eckern May 21, 2020 04:38PM

Re: Conditionally removing a proxy header

Francis Daly May 26, 2020 12:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 304
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