<div dir="ltr">Hello,<div><br></div><div>you can use many values on the map, take a look on its docs.</div><div>One quickly example may be (not tested)</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">map $uri $custom_content_type {</span></div>

<div>    default         "text/html";<br style="font-family:arial,sans-serif;font-size:13px"><font face="arial, sans-serif">    ~(.*\.json)$  "application/json";</font><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">}</span><br style="font-family:arial,sans-serif;font-size:13px"><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">location ~ \.json$ {</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">    proxy_hide_header Content-Type;</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">    add_header Content-Type </span><span style="font-family:arial,sans-serif;font-size:13px">$custom_content_type</span><span style="font-family:arial,sans-serif;font-size:13px">;</span></div>

<div><br></div><div>    # other proxy configurations like proxy_pass<br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">}</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div><font face="arial, sans-serif">Or try to use the types {} directive which is specific to make the </font></div><div><font face="arial, sans-serif">relationship between extensions and content-type.</font></div>

<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 12:14 AM, manish-ezest <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello All,<br>
<br>
Can somebody answer this question? I am facing this issue from many days.<br>
<br>
--Manish<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,252360,252378#msg-252378" target="_blank">http://forum.nginx.org/read.php?2,252360,252378#msg-252378</a><br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>