nginx IETF RFC21266 Compliance - 'Proxy-Connection'

Maxim Dounin mdounin at mdounin.ru
Tue Sep 15 13:40:13 UTC 2015


Hello!

On Tue, Sep 15, 2015 at 03:22:39AM +0200, Tyarko Leander Rodney wrote:

> Hi,
> 
> I’ve posted this question on the IRC before but had no luck. I 
> have the following problem:
> 
> I’d like to disable the ‘Proxy-Connection’ Response Header. I 
> know, that the “Connection” Header is hard coded in 
> ngx_http_header_filter_module.c, but does the same apply to 
> “Proxy-Connection” (couldn’t find it in the sources)?
> 
> I’ve tried the more_clear_headers from the ngx_headers_more 
> module and  proxy_set_header(which both work fine with all other 
> headers).
> 
> Background: The ‘Proxy-Connection’ sadly violates our Server 
> Policy (strict RFC21266 compliance).

The "Proxy-Connection" header is not something standard and there 
are no requirements about handling it in any specification I'm 
aware of, including RFC 2616.  (And there is no such a thing as 
"RFC21266", either.)

Either way, if you want to stop some header, e.g., 
Proxy-Connection, from being forwarded by nginx proxy module, 
then:

- for request headers, use:
  proxy_set_header Proxy-Connection "";

- for response headers, use
  proxy_hide_header Proxy-Connection;

See here for the documentation:

http://nginx.org/r/proxy_set_header
http://nginx.org/r/proxy_hide_header

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list