Welcome! Log In Create A New Profile

Advanced

Fwd: NGINX is sending for .json file text/html Conent type

Marcel Kočíšek
July 16, 2021 02:40AM
Stack overflow:

https://stackoverflow.com/questions/68362629/nginx-is-sending-for-json-file-text-html-conent-type

I have problem with my nginx server in version nginx:1.19-alpine running on
Docker.

Static files with .json extension are served with mime type text/html.
Request:

curl 'example.json' -H 'Accept: application/json' -H 'Accept-Language:
en-US,en;q=0.5' --compressed -H 'Referer: http://192.168.16.201/' -H
'X-Requested-With: XMLHttpRequest'

Response:

HTTP/1.1 200 OKServer: nginxDate: Tue, 13 Jul 2021 12:23:51
GMTContent-Type: text/html;charset=utf-8Content-Length:
14746Connection: keep-aliveContent-Encoding: gzipCache-Control:
no-storeAccept-Ranges: bytesVary: OriginVary:
Access-Control-Request-MethodVary:
Access-Control-Request-HeadersLast-Modified: Thu, 01 Jan 1970 00:00:01
GMT

mime.types are configured correctly.

--
*Marcel Kocisek *
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Fwd: NGINX is sending for .json file text/html Conent type

Marcel Kočíšek July 16, 2021 02:40AM

Re: Fwd: NGINX is sending for .json file text/html Conent type

Maxim Dounin July 16, 2021 12:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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