• Resolved weblv

    (@weblv)


    Hi Raul,

    We’ve been using FVM for the past 4 months and today we got this weird problem.

    The site is hosted on a shared CPanel with Apache + Engintron with PHP 7.2 with Cloudflare as a CDN.

    When FVM is on all browsers that we tested (Firefox, Chrome and Safari) give out these errors:

    The resource from “/wp-content/cache/fvm/1562000296/out/header-a76cab26.min.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
    The resource from “/wp-content/cache/fvm/1562000296/out/header-a76cab26.min.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
    The resource from “/wp-content/cache/fvm/1562000296/out/header-ee7f27a9.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
    The resource from “/wp-content/cache/fvm/1562000296/out/footer-15d73f81.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
    The resource from “/wp-content/cache/fvm/1562000296/out/footer-061b3183.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
    The resource from “/wp-content/cache/fvm/1562000296/out/footer-15d73f81.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
    The resource from “/wp-content/cache/fvm/1562000296/out/footer-061b3183.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
    The resource from “/wp-content/cache/fvm/1562000296/out/footer-42c414fa.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

    We have HSTS enabled on Cloudflare with the No-Sniff header but this never happened before.

    Is this a server based error (Apache + Engintron) or is it a Cloudflare based error?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raul P.

    (@alignak)

    I’ve seen something similar happening on cloudflare when the origin file returns a 404 or 200 OK html file instead of an actual file, but usually purging all caches solves it.

    mimetypes are server based, so it’s unrelated to the plugin.

    Just take a look at what is showing on your browser, when you open the file url on your browser. It’s probably a 404 or some html, which cloudflare will correctly alert you that it’s not a valid.

    Check if the FVM files are being created and watch out for page cache, after purging FVM.
    If you purge FVM without purging server cache, it will point to inexistent css/js files.

    Thread Starter weblv

    (@weblv)

    Hi Raul,

    I’ve deployed a test server on the same CPanel environment and what’s interesting is that if I enable the plugin on the test server the cache files are created without any problem, but in the main server if I turn on the plugin no cache files are saved…

    The cache path is correct on the main server but it seems that something is blocking the cache file save.

    I’ll do more testing and give you more feedback on this subject.

    EDIT: found THE solution… remove the last backslash from the cache location…it’s working now.

    Thanks

    • This reply was modified 5 years, 5 months ago by weblv.
    Plugin Author Raul P.

    (@alignak)

    OK, then I suggest changing the path to use the uploads directory instead.
    Make sure ownership and file permissions on the parent directory, are correct before changing the path.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blocked resources due to mime type mismatch’ is closed to new replies.