Override Content-Type header with proxied requests

Wandenberg Peixoto wandenberg at gmail.com
Fri Aug 8 15:43:18 UTC 2014


One question, your backend are sending the content-type header if you made
the request to it?
If yes, the value is right?
If not, I think the problem is on backend configuration.
You can set it on the nginx using the map like I suggest, but will have to
add all possible file types on the map, like

map $uri $custom_content_type {
    default         "text/html";
    ~(.*\.json)$  "application/json";
    ~(.*\.css)$  "text/css";
   ~(.*\.js)$  "application/javascript";
   # and all other formats
}

But I suggest to check the configuration on Backend server.




On Fri, Aug 8, 2014 at 10:23 AM, manish-ezest <nginx-forum at nginx.us> wrote:

> Hello wandenberg,
>
> This procedure is not working for internet explorer. The CSS are not
> loading
> properly. so we have to somehow get the Content-Type in the header. Is
> there
> anything we can use?
>
> --Manish
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,239473,252416#msg-252416
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140808/3e7df81a/attachment.html>


More information about the nginx mailing list