Nginx 1.17.0 doesn't change the content-type header
andre8525 at hotmail.com
Wed Jul 3 12:25:53 UTC 2019
Thanks Francis, will modify the upstream server
From: nginx <nginx-bounces at nginx.org> on behalf of Francis Daly <francis at daoine.org>
Sent: Wednesday, July 3, 2019 12:22 PM
To: nginx at 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:
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
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,
Francis Daly francis at daoine.org
nginx mailing list
nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx