content-type after proxy_pass

dannynoonan nginx-forum at
Sat Mar 6 17:46:49 MSK 2010

In servicing a request for: /foo.jpg which actually lives out in a mogilefs backend  as /00/00/01.fid or something like that.

I've configured nginx to peform 
proxy_pass -> fastcgi_pass -> python app -> X-Accel-Redirect -> proxy_pass

the first proxy_pass that receives the request for /foo.jpg has proxy_hide_header Content-Type so as to not pick up the mime-type for *.fid from the backend.

I was hoping that the nginx instance closest to the client would remember that foo.jpg was requested and assign content-type appropriately, but content-type remains unset.

I see mention of something that could help in this thread:
location /combined.css {
    proxy_pass ..
    override_type     ;

but alas, override_type seems to be not available as of: nginx-0.7.65

Is there another method I could use to set content-type?

Posted at Nginx Forum:,60636,60636#msg-60636

More information about the nginx mailing list