Welcome! Log In Create A New Profile

Advanced

Re: Override Content-Type header with proxied requests

August 06, 2014 08:18AM
Hello Appa,

I am having the same issue. I want NGINX to serve all the json file from upstream as a content type of application/json.I tried with map just like you suggested but I am not able to figure out what should be inside map(That you have written below), Can you please suggest?

map $upstream_http_content_type $s3_content_type {
# S3 -> real...
}

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

--Manish
Subject Author Posted

Override Content-Type header with proxied requests

andrea.mandolo May 23, 2013 11:07AM

Re: Override Content-Type header with proxied requests

Jonathan Matthews May 23, 2013 11:12AM

Re: Override Content-Type header with proxied requests

António P. P. Almeida May 23, 2013 11:26AM

Re: Override Content-Type header with proxied requests

António P. P. Almeida May 23, 2013 11:34AM

Re: Override Content-Type header with proxied requests

manish-ezest August 06, 2014 08:18AM

Re: Override Content-Type header with proxied requests

andrea.mandolo May 24, 2013 04:58AM

Re: Override Content-Type header with proxied requests

wandenberg August 07, 2014 12:12AM

Re: Override Content-Type header with proxied requests

manish-ezest August 07, 2014 11:57AM

Re: Override Content-Type header with proxied requests

wandenberg August 07, 2014 01:58PM

Re: Override Content-Type header with proxied requests

manish-ezest August 07, 2014 02:17PM

Re: Override Content-Type header with proxied requests

manish-ezest August 07, 2014 02:30PM

Re: Override Content-Type header with proxied requests

manish-ezest August 08, 2014 09:23AM

Re: Override Content-Type header with proxied requests

wandenberg August 08, 2014 11:44AM

Re: Override Content-Type header with proxied requests

manish-ezest August 08, 2014 10:34PM

Re: Override Content-Type header with proxied requests

manish-ezest August 13, 2014 06:18AM

Re: Override Content-Type header with proxied requests

flygoast August 09, 2014 11:36PM

Re: Override Content-Type header with proxied requests

Pavel Vasev May 24, 2015 07:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready