GZIP problem with backend hosts
Alan Williamson
alan at blog-city.com
Fri Aug 29 15:08:21 MSD 2008
> If you did not set
> proxy_set_header Accept-Encoding "";
>
> then nginx will pass it backend.
i do not understand this. Are you suggesting i need to set this in
order for nginx to send that header to the back end?
What about the other headers that get sent with the request (cookie etc)
we don't manually set them do we? They simply get passed to the backend.
It always bothers me that nginx doesn't pass "Host:" one and i have to
set this manually, makes me wonder what other headers nginx is silently
rejecting and not passing on to the backend.
can you tell me what the definitive answer is here?
------ snippet -------
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_pass http://backends;
}
-----------------------
So if a client sends in the header that he can accept GZIP encoding,
nginx is removing this and not passing it through.
So how can i add it back in, but for only the clients that can accept
it; a bit silly to ALWAYS add it in especially if its not been set.
> I do not know conditions when Amazon may refuse to compresses response,
> it may have simillar limits as nginx has:
this has ***nothing*** to do with Amazon. I merely was illustrating
that our infastructure runs within the EC2 cloud.
More information about the nginx
mailing list