0

My Magento 2 webshop (oplader.com) is having CSS/JS issues when setting the mode to production.

It gives the following error in the console:

The resource from “https://www.oplader.com/%3Clink%20href=%22https://fonts.goog…t.css%22%3E%3Cscript%20type=%22text/javascript%22%3Erequire([” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

enter image description here

Some additional information:

  • In developer mode, no issues are shown in the console log.
  • I have refreshed the cache, run setup, deployed static-content and recompiled di.
  • I have checked the presence of the .htaccess

It is also showing this in the HTML and on top of the page: enter image description here

I have had it in production mode before with no issues. Does anyone know how to might occur?

1 Answer 1

0

After digging into it, it seemed to start with a line of code which should have added Google Fonts to the website. This was set-up in the Porto Theme Design screen in the admin panel. When disabling Google Fonts there, the issue was resolved.

I will now add Google Fonts manually outside the Theme settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.