Welcome! Log In Create A New Profile

Advanced

Re: Nginx 1.17.0 doesn't change the content-type header

July 03, 2019 08:26AM
Thanks Francis, will modify the upstream server

________________________________
From: nginx <nginx-bounces@nginx.org> on behalf of Francis Daly <francis@daoine.org>
Sent: Wednesday, July 3, 2019 12:22 PM
To: nginx@nginx.org
Subject: Re: Nginx 1.17.0 doesn't change the content-type header

On Wed, Jul 03, 2019 at 06:17:46AM +0000, Andrew Andonopoulos wrote:

Hi there,

I think that the point is:

nginx does not change the content-type header from the upstream server.

If you want your nginx to do that, you have to configure your nginx to
do that -- probably using "add_header".

> Nginx deliver the file from the cache but the content-type is from
> the default in the HTTP rather than the location in the Server

The "types" configuration applies when nginx serves a file from the
filesystem.

If you proxy_pass, nginx does not serve a file from the filesystem.

The "correct" fix is for you to ensure that your upstream server sends
the content-type header that you want.

The alternate fix is for you to configure your nginx server to send the
content-type header that you want; you will need to tell nginx how to
know what that header value is, for each response that you make.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx 1.17.0 doesn't change the content-type header

andregr-jp June 29, 2019 06:50PM

Re: Nginx 1.17.0 doesn't change the content-type header

Maxim Dounin July 02, 2019 08:42PM

Re: Nginx 1.17.0 doesn't change the content-type header

andregr-jp July 03, 2019 02:18AM

Re: Nginx 1.17.0 doesn't change the content-type header

Francis Daly July 03, 2019 08:24AM

Re: Nginx 1.17.0 doesn't change the content-type header

andregr-jp July 03, 2019 08:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready