I get the following error in console:

Refused to apply style from ‘system/files/honeypot/honeypot.css?p72r87' because its MIME type (‘’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Comments

mibfire created an issue. See original summary.

geerlingguy’s picture

Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

I haven't seen this happening on any sites where I'm using Honeypot, nor have I seen any confirmation this is happening on others' sites. Do you maybe have some logic in .htaccess, your webserver configuration, in a CDN, or elsewhere that could be changing the MIME type of files that are served/cached?

Alternatively, is this the only file there's an error displayed for, or are there any other CSS or JS files that throw any console errors or warnings?

Can you provide any set of steps to reproduce, e.g. on a fresh drupal site or in a local environment?

mibfire’s picture

Unfortunately i don’t remember now where i saw this error so if it is good for you then issue can be closed. Thanks

geerlingguy’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Thanks for posting the update, closing the issue then!

gbirch’s picture

I'd like to reopen this, please.

I'm seeing this error in Chrome (83) on anonymous forms where honeypot is enabled AND the site's file system defaults to "Private local files served by Drupal". Note the URL in the error message: it's trying to get a css file that is supposed to be served privately. So the content returned by the server is the HTML of the login page. Not surprising it is generating an error. Why does Honeypot generate a css file in the file system, anyway? Obfuscation?

If not reasonably fixable, perhaps an update to the README?

"Refused to apply style from 'https://SITEURL/user/login?destination=system/files/honeypot/honeypot.cs...' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

pureh2o’s picture

I have the same issue running on a Drupal 7.97 and PHP 8.2.23 and honeypot version 7.x-1.28
The error I'm getting in the console of Chrome as well as in Edge.
Refused to apply style from "mysite.com/system/files/honeypot/honeypot.css?sjnqlb' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."