# Nginx RFC21266 Compliance - 'Proxy-Connection'

**URL:** <https://www.ruby-forum.com/t/nginx-rfc21266-compliance-proxy-connection/243143>\
**Category:** NGINX\
**Created:** [August 25, 2015, 10:04pm UTC](https://www.ruby-forum.com/t/nginx-rfc21266-compliance-proxy-connection/243143 "2015-08-25T22:04:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [August 25, 2015, 10:04pm UTC](https://www.ruby-forum.com/t/nginx-rfc21266-compliance-proxy-connection/243143/1 "2015-08-25T22:04:01Z")

</div>

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).

Kind regards

T. Rodney

---

<div class="post-metadata">

**Author:** ![Tyarko\_Leander\_Rodn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/57b2e6/32.png) [@Tyarko\_Leander\_Rodn](https://www.ruby-forum.com/u/Tyarko_Leander_Rodn)\
**Post date:** [August 25, 2015, 10:09pm UTC](https://www.ruby-forum.com/t/nginx-rfc21266-compliance-proxy-connection/243143/2 "2015-08-25T22:09:52Z")

</div>

On Tuesday 25 August 2015 22:03:10 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)?  
> [..]

NGINX doesn’t produce the Proxy-Connection header.

I assume it’s returned by your backend.  
If so, then see the “proxy\_hide\_header” directive:

> **[Module ngx\_http\_proxy\_module](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header)**
>
> The ngx\_http\_proxy\_module module allows passing requests to another server.

wbr, Valentin V. Bartenev

---

<div class="post-metadata">

**Author:** ![Tyarko\_Leander\_Rodn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/57b2e6/32.png) [@Tyarko\_Leander\_Rodn](https://www.ruby-forum.com/u/Tyarko_Leander_Rodn)\
**Post date:** [August 25, 2015, 10:21pm UTC](https://www.ruby-forum.com/t/nginx-rfc21266-compliance-proxy-connection/243143/3 "2015-08-25T22:21:33Z")

</div>

Looking at [List of HTTP header fields - Wikipedia](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) it  
suggests it’s a non-standard request header.

You can probably strip this out of the request to the real server with

proxy\_set\_header “Proxy-Connection” “”;

Although I’d expect the backend server to ignore invalid request headers  
rather than bork on the request.

Steve.
