Welcome! Log In Create A New Profile

Advanced

Re: Preserving all original request headers through a proxy_pass ?

December 06, 2010 06:48PM
Hi,

On 07/12/2010 01:25, Rasmus Lerdorf wrote:
> I'm probably being a bit lazy here, I have only skimmed the code, but is
> there a way to bounce all original request headers through a proxy_pass
> prefixed with X-Orig-* or something like that?
>
> One reason for wanting to do this is for proxy detection. Common
> headers that are important to preserve are HTTP_X_FORWARDED, HTTP_VIA
> and HTTP_PROXY_CONNECTION.
Yes, you can use the proxy_set_header directive
(http://wiki.nginx.org/HttpProxyModule#proxy_set_header).

e.g.

proxy_set_header NAME $value;

You can obviously choose anything for NAME, including X-Orig-..., and
the values can be static strings or generated using variables.

Marcus.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Preserving all original request headers through a proxy_pass ?

Rasmus Lerdorf December 06, 2010 06:32PM

Re: Preserving all original request headers through a proxy_pass ?

Eugaia December 06, 2010 06:48PM

Re: Preserving all original request headers through a proxy_pass ?

Rasmus Lerdorf December 06, 2010 07:20PM

Re: Preserving all original request headers through a proxy_pass ?

Maxim Dounin December 06, 2010 08:32PM

Re: Preserving all original request headers through a proxy_pass ?

elgreco December 30, 2010 04:56PM

Re: Preserving all original request headers through a proxy_pass ?

Maxim Dounin December 30, 2010 06:32PM

Re: Preserving all original request headers through a proxy_pass ?

elgreco December 31, 2010 03:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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