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:
- Checkout branch
- Composer update
- bin/magento
- rm -rf var/cache/*
- rm -rf var/page_cache/*
- rm -rf var/generation/*
- rm -rf pub/static/*
- rm -rf var/view_preprocessed/*
- rm -rf var/di/*
- rm -rf generated/code/* generated/metadata/*
- php bin/magento maintenance:enable
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento setup:static-content:deploy
- php bin/magento maintenance:disable
- php bin/magento cache:flush
- find . -type f -exec chmod 644 {} \;
- find . -type d -exec chmod 755 {} \;
- find ./var -type d -exec chmod 777 {} \;
- chmod -R 777 ./pub/media/
- chmod -R 777 ./pub/static/
- chmod 777 ./app/etc
- chmod 644 ./app/etc/*.xml
I get no errors anywhere, except the one above in the browser console.
If you could have any hint for me, I'm lost! :)