Is there a way to allow .php files to be used for CSS (text/css MIME type), or disable strict MIME checking?

We want to make a plugin work on our website but there seems to be a problem with the CSS file of the plugin not being loaded. It’s returning a 500 error.

The plugin vendor believes this happens due to our server’s nginx rules, Specifically… X-Content-Type-Options: nosniff

  • Is there a way to allow .php files to be used for CSS (text/css MIME type), or disable strict MIME checking? If this is no option:

  • Can the nginx.conf file be used to override the MIME type of our CSS file and make it text/css?

Thanks in advance.

I’m not clear how Cloudflare fits into this issue.

You could use a Transform Rule to remove that x-content-type-options header, but that would be unwise.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.