Welcome! Log In Create A New Profile

Advanced

Re: Facing content-type issue with try_files.

Nicholas Sherlock
May 08, 2014 12:40AM
On 6 May 2014 16:39, Makailol Charls <makailol7@gmail.com> wrote:

> Is it necessary to have an extension to image file to set proper
> content-type for Nginx? Couldn't web server set the content-type from *file
> type* ?
>

That would require Nginx to inspect the file contents and make a guess as
to what file type it is. I don't know if it could do that.

You could try just using:

add_header Content-Type image/jpeg;

And hope that the user's web browser will automatically work out the
correct Content-Type, if the image was actually a PNG or something.

Cheers,
Nicholas Sherlock
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Facing content-type issue with try_files.

Makailol Charls May 02, 2014 01:14AM

Re: Facing content-type issue with try_files.

Makailol Charls May 06, 2014 12:40AM

Re: Facing content-type issue with try_files.

Nicholas Sherlock May 08, 2014 12:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 144
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