Hello,

you can use many values on the map, take a look on its docs.
One quickly example may be (not tested)

map $uri $custom_content_type {
    default         "text/html";
    ~(.*\.json)$  "application/json";
}

location ~ \.json$ {
    proxy_hide_header Content-Type;
    add_header Content-Type $custom_content_type;

    # other proxy configurations like proxy_pass
}

Or try to use the types {} directive which is specific to make the
relationship between extensions and content-type.



On Thu, Aug 7, 2014 at 12:14 AM, manish-ezest <[email protected]> wrote:

> Hello All,
>
> Can somebody answer this question? I am facing this issue from many days.
>
> --Manish
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,252360,252378#msg-252378
>
> _______________________________________________
> nginx mailing list
> [email protected]
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to