atom feed3 messages in ru.sysoev.nginxRe: problem w/ gzip when hiding Conte...
FromSent OnAttachments
baveryJul 14, 2009 1:07 am 
baveryJul 16, 2009 1:54 am 
Igor SysoevJul 16, 2009 5:51 am 
Subject:Re: problem w/ gzip when hiding Content-Type header from upstream server
From:Igor Sysoev (is@rambler-co.ru)
Date:Jul 16, 2009 5:51:12 am
List:ru.sysoev.nginx

On Thu, Jul 16, 2009 at 04:55:00AM -0400, bavery wrote:

I did some more checking, and am now finding that other .js & .css files from
the upstream server are not being compressed as well, except that these files
simply are served from the upstream server with no content-type header at all.

So why does nginx not recognize the file type it is handling based on mime-type
configuration when dealing with proxied files?

nginx think that upstream should set Content-Type by itself.

Probably I need to extend "add_header" to set content type:

location /combined.css { proxy_pass .. proxy_hide_header Content-Type; add_header Content-Type text/css;

or implement "override_type" to set content-type based on mime.types file or just string:

location /combined.css { proxy_pass .. override_type [on|off|mime-type];