# Content-type after proxy\_pass

**URL:** <https://www.ruby-forum.com/t/content-type-after-proxy-pass/184678>\
**Category:** NGINX\
**Created:** [March 6, 2010, 3:47pm UTC](https://www.ruby-forum.com/t/content-type-after-proxy-pass/184678 "2010-03-06T15:47:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannynoonan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@dannynoonan](https://www.ruby-forum.com/u/dannynoonan)\
**Post date:** [March 6, 2010, 3:47pm UTC](https://www.ruby-forum.com/t/content-type-after-proxy-pass/184678/1 "2010-03-06T15:47:26Z")

</div>

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](http://n2.nabble.com/problem-w-gzip-when-hiding-Content-Type-header-from-upstream-server-td3256026.html)  
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?

[http://n2.nabble.com/problem-w-gzip-when-hiding-Content-Type-header-from-upstream-server-td3256026.html](http://n2.nabble.com/problem-w-gzip-when-hiding-Content-Type-header-from-upstream-server-td3256026.html)

Posted at Nginx Forum:

> **[content-type after proxy\_pass](https://forum.nginx.org/read.php?2,60636,60636#msg-60636)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![dannynoonan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@dannynoonan](https://www.ruby-forum.com/u/dannynoonan)\
**Post date:** [March 16, 2010, 6:38pm UTC](https://www.ruby-forum.com/t/content-type-after-proxy-pass/184678/2 "2010-03-16T18:38:04Z")

</div>

I am having a similar problem, advice appreciated. Thanks

Posted at Nginx Forum:

> **[Re: content-type after proxy\_pass](https://forum.nginx.org/read.php?2,60636,64459#msg-64459)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![dannynoonan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@dannynoonan](https://www.ruby-forum.com/u/dannynoonan)\
**Post date:** [March 16, 2010, 12:02am UTC](https://www.ruby-forum.com/t/content-type-after-proxy-pass/184678/3 "2010-03-16T00:02:35Z")

</div>

I’m having the same issue. Anyone find a solution? Thanks.

Posted at Nginx Forum:

> **[Re: content-type after proxy\_pass](https://forum.nginx.org/read.php?2,60636,64194#msg-64194)**
>
> 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...
