Magento – Pub/media css was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff in magento 2

cssmagento2Ubuntu

I set up Magento 2 localhost migrated from the server.

but when load frontend showing like this

enter image description here

Pub/media CSS was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff in Magento 2

how I can fix this

Magento ver 2.2.6

ubuntu 18.04

PHP 7

Best Answer

  1. Remove all files from var/ folder.
  2. Check for .htaccess in pub/static. If not exists, take a file from a fresh setup.
  3. Run the following commands

    php bin/magento setup:static-content:deploy -f
    php bin/magento indexer:reindex
    php bin/magento cache:clean
    
Related Topic