Reverse proxy deleting ETag header from response

ochronus nginx-forum at nginx.us
Thu Sep 12 11:07:29 UTC 2013


I have a simple config that proxies to/from a django app:

upstream django_app{
    server 127.0.0.1:4567;
}

server {
    listen 80;
    server_name xxxxxxxxx;

    location / {
        proxy_pass_header Set-Cookie;
        proxy_pass_header ETag;
        proxy_pass http://django_app;
    }
}

My problem is that nginx deletes the ETag header from the response even if I
specify proxy_pass_header ETag.
The upstream server does return the correct headers:

curl -v http://127.0.0.1:4567/
* About to connect() to 127.0.0.1 port 4567 (#0)
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 4567 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1:4567
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: gunicorn/0.17.2
< Date: Thu, 12 Sep 2013 11:06:18 GMT
< Connection: close
< Transfer-Encoding: chunked
< ETag: 495e0dc4-923c-4a99-8957-e6bbbc89cf5a
< Content-Type: text/html; charset=utf-8
< Cache-Control: Cache-Control:private, must-revalidate, proxy-revalidate

Any ideas? Thanks in advance.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,242807,242807#msg-242807



More information about the nginx mailing list