proxy_hide_header question

Francis Daly francis at daoine.org
Wed Oct 8 07:32:06 UTC 2014


On Tue, Oct 07, 2014 at 10:42:28PM -0400, keeyong wrote:

Hi there,

> I am using nginx as a reverse proxy and am trying to log some variables set
> by apache to nginx log. So certain HTTP response headers are set by apache
> (PHP) and then I log them successfully with $sent_http_* variables.

$sent_* refers to things sent to the client.

http://nginx.org/en/docs/http/ngx_http_core_module.html#variables

$upstream_* refers to things received from the upstream.

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables

> But then I don't want the info to be exposed to outside world so I tried to
> remove them by adding "proxy_hide_header".

That means that it won't be sent to the client, so the $sent_* variable
should be empty.

> I want to remove the entries only for end users but I
> want to access them inside my nginx.

Use the correct variable.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list