Fwd: NGINX is sending for .json file text/html Conent type
Marcel Kočíšek
marcel.kocisek at gmail.com
Fri Jul 16 06:38:39 UTC 2021
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 *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210716/4424c9d2/attachment.htm>
More information about the nginx
mailing list