Skip to content

nginx

django app: Resource blocked due to MIME type mismatch

Running your Django app first time in production, you might bump into the issue of your browser blocking static resources (.css, .js) with a message "Resource blocked due to MIME type mismatch". I was googling a bit here and there, most results are providing a bit context demanding answers.

"Hint"

The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised in the Content-Type headers should be followed and not be changed.

(The document provided by the link "explaining" the issue in the browser)

Dude, what do I do? Some answers on Stack Overflow recommend to turn of security features in your browser. Well, swiping the issue under the carpet does not make it go.