Welcome! Log In Create A New Profile

Advanced

content-type after proxy_pass

March 06, 2010 01:41AM
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:
http://n2.nabble.com/problem-w-gzip-when-hiding-Content-Type-header-from-upstream-server-td3256026.html
location /combined.css {
proxy_pass ..
override_type [on|off|mime-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?


http://n2.nabble.com/problem-w-gzip-when-hiding-Content-Type-header-from-upstream-server-td3256026.html
Subject Author Posted

content-type after proxy_pass

dannynoonan March 06, 2010 01:41AM

Re: content-type after proxy_pass

new2nginx March 15, 2010 07:01PM

Re: content-type after proxy_pass

nginx_user March 16, 2010 01:37PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready