You are viewing an old revision of this post, from January 3, 2020 @ 11:40:46. See below for differences between this version and the current revision.

Magento 2 – The resource from pub/ directory was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)

When you deploy the source code to the live server, you may see the issue

The resource from pub/ directory was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)...

You can solve it by the following ways

  1. Remove all files from var/ folder by using this command rm -rf var/*
  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

Hope it helps you solve the problem 🙂

Revisions

  • January 3, 2020 @ 11:42:06 [Current Revision] by Sharing Solution
  • January 3, 2020 @ 11:40:46 by Sharing Solution
  • January 3, 2020 @ 11:39:08 by Sharing Solution

Revision Differences

There are no differences between the January 3, 2020 @ 11:40:46 revision and the current revision. (Maybe only post meta information was changed.)

No comments yet.

Leave a Reply