Reputation: 1565
Here the whole error message: The resource from “https://example.com/static/_cache/merged/423594d2c9a788a2af3e706167e88c9f.min.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Context: I had an existing project to debug. Everything went well in local environment. I deployed in staging; everything went well too. In production I got the MIME type error when deploying. The front-end is ok, I only got this in back-end.
Project is on Magento 2.1.1. Production is on NGINX. Everywhere else on apache.
I know that they were an attempts to upgrade to 2.3.1 and it was rollbacked.
I'm deploying using this procedure:
I get no errors anywhere, except the one above in the browser console.
If you could have any hint for me, I'm lost! :)
Upvotes: 1
Views: 982
Reputation: 503
This is probably because it ends up in a 404. In my case I fixed it by changing
web/secure/base_static_url
and web/secure/base_static_url
from
{{secure_base_url}}static/
and {{secure_base_url}}static/
to
{{secure_base_url}}pub/static/
and {{secure_base_url}}pub/static/
respectively.
I'm not sure exactly why it is served from the pub folder in this case while my other Magento projects don't have this and I suspect it's a Valet or Nginx misconfiguration in my own case.
Upvotes: 0