# Can nginx automaticly add Content-Type header when there is no Can nginx add Content-Type in X-Acce

**URL:** <https://www.ruby-forum.com/t/can-nginx-automaticly-add-content-type-header-when-there-is-no-can-nginx-add-content-type-in-x-acce/165774>\
**Category:** NGINX\
**Created:** [April 17, 2009, 10:41am UTC](https://www.ruby-forum.com/t/can-nginx-automaticly-add-content-type-header-when-there-is-no-can-nginx-add-content-type-in-x-acce/165774 "2009-04-17T10:41:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xia\_Q](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/c67d28/32.png) [@Xia\_Q](https://www.ruby-forum.com/u/Xia_Q)\
**Post date:** [April 17, 2009, 10:41am UTC](https://www.ruby-forum.com/t/can-nginx-automaticly-add-content-type-header-when-there-is-no-can-nginx-add-content-type-in-x-acce/165774/1 "2009-04-17T10:41:17Z")

</div>

Hi,  
Can nginx automaticly add Content-Type header when there is no  
Content-Type header in backend response with X-Accel-Redirect?

I am taking use of X-Accel-Redirect to do the privacy control for  
static files. And I have to add the Content-Type header by the backend  
CGI programs. If nginx could do so, the backend CGI programs using  
X-Accel-Redirect will feel much better and more efficient.

## Regards,

e$B2F@6A3e(B  
Xia Q.  
removed\_email\_address@domain.invalid  
Sent from Beijing, 11, China  
Mitch Hedberg - "I drank some boiling water because I wanted to  
whistle." -  
[http://www.brainyquote.com/quotes/authors/m/mitch\_hedberg.html](http://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html)

---

<div class="post-metadata">

**Author:** ![Xia\_Q](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/c67d28/32.png) [@Xia\_Q](https://www.ruby-forum.com/u/Xia_Q)\
**Post date:** [April 17, 2009, 10:45am UTC](https://www.ruby-forum.com/t/can-nginx-automaticly-add-content-type-header-when-there-is-no-can-nginx-add-content-type-in-x-acce/165774/2 "2009-04-17T10:45:59Z")

</div>

çœ‹ä¸‹è¿™ä¸ªæ¨¡å—å¯¹ä½ æœ‰æ²¡æœ‰å¸®åŠ©ã€‚

[http://wiki.nginx.org/NginxHttpHeadersModule](http://wiki.nginx.org/NginxHttpHeadersModule)

2009/4/17 Xia Q. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
