Search code examples
nginxhttp-headersmime-typescontent-type

Refused to execute script from '..../angular.min.js' because its MIME type ('application/octet_stream') is not executable, and strict MIME type check


I saw several questions about this error, but not sure, for some websites, it works. same angular.js, same html. Even on my localhost everything is working (even if content-type is application/octet_stream) but using other websites it doesn't (same Chrome...)

Any idea?


Solution

  • If you have the X-Content-Type-Options: nosniff HTTP Header configured in your web server then the browser will not be able to "sniff" content to guess what type it is so you must send it with the appropriate content-type.