<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div>Stack overflow:</div><div><br></div><div><a href="https://stackoverflow.com/questions/68362629/nginx-is-sending-for-json-file-text-html-conent-type" target="_blank">https://stackoverflow.com/questions/68362629/nginx-is-sending-for-json-file-text-html-conent-type</a></div><div><br></div><div>
<button aria-label="Bookmark" aria-describedby="--stacks-s-tooltip-5vpxtf5q">
</button>
<div><div>
</div>
</div>
<div>
<div>
<p>I have problem with my nginx server in version nginx:1.19-alpine running on Docker.</p>
<p>Static files with .json extension are served with mime type text/html.</p></div></div>
</div><div>Request:</div><div>
<pre><code>curl <span>'example.json'</span> -H <span>'Accept: application/json'</span> -H <span>'Accept-Language: en-US,en;q=0.5'</span> --compressed -H <span>'Referer: <a href="http://192.168.16.201/" target="_blank">http://192.168.16.201/</a>'</span> -H <span>'X-Requested-With: XMLHttpRequest'</span></code></pre>
</div><div>Response:</div><div>
<pre><code><span>HTTP/1.1</span> <span>200</span> OK
<span>Server</span><span>: </span>nginx
<span>Date</span><span>: </span>Tue, 13 Jul 2021 12:23:51 GMT
<span>Content-Type</span><span>: </span>text/html;charset=utf-8
<span>Content-Length</span><span>: </span>14746
<span>Connection</span><span>: </span>keep-alive
<span>Content-Encoding</span><span>: </span>gzip
<span>Cache-Control</span><span>: </span>no-store
<span>Accept-Ranges</span><span>: </span>bytes
<span>Vary</span><span>: </span>Origin
<span>Vary</span><span>: </span>Access-Control-Request-Method
<span>Vary</span><span>: </span>Access-Control-Request-Headers
<span>Last-Modified</span><span>: </span>Thu, 01 Jan 1970 00:00:01 GMT</code></pre>
</div><div>mime.types are configured correctly.<br></div><div><br>-- <br><div dir="ltr" data-smartmail="gmail_signature"><b><span style="background-color:rgb(255,204,102)"><font color="#ff0000">Mar</font><font color="#003300">cel </font><font color="#000099">Kocise</font>k </span><span style="background-color:rgb(255,255,255)"> </span></b><div><b><span style="background-color:rgb(255,255,255)"><br></span></b></div></div></div></div>
</div></div>