Clientlib css not loading in Dispatcher only | Community
Skip to main content
Level 2
May 12, 2025
Solved

Clientlib css not loading in Dispatcher only

  • May 12, 2025
  • 3 replies
  • 797 views

Hi ,
I am getting this error
"Refused to apply style from 'https://domainname/404.html' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."
Refused to apply style from 'https://domainname/etc.clientlibs/projectname/clientlibs/clientlib-dependencies.lc-d41d8cd98f00b204e9800998ecf8427e-lc.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

We have the same code across all our environment but only one env has this issue,
Publisher is working all styles are loading fine but only in dispatcher this error is coming(all client libs are allowed in rules)
What might be the issue? how can we fix this 

 

Best answer by arunpatidar

Hi @shankar_k 

Yes, it is possible that CDN is not allowing those request. Is it possible to check access without CDN using AEM url on publish?
or can you enable dispatcher debugger log and check the status of those request?

3 replies

Level 3
May 12, 2025

Hi, what's the output in the dispatcher.log?

arunpatidar
Community Advisor
Community Advisor
May 13, 2025

Hi @shankar_k 

Could you please check dispatcher filter rule? Make sure this is not overriden by another rule at the bottom of the rules.

 

# Enable clientlibs proxy servlet
/0012 { /type "allow" /method "GET" /url "/etc.clientlibs/*" }

 

Arun Patidar
Shankar_KAuthor
Level 2
May 13, 2025

Hi @arunpatidar  yes we have all the rules in place but only in DEV environment its happening , same code works with other env , we have connected to akamai 

Is there any possibility that Changes in CDN is causing this issue??

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
May 13, 2025

Hi @shankar_k 

Yes, it is possible that CDN is not allowing those request. Is it possible to check access without CDN using AEM url on publish?
or can you enable dispatcher debugger log and check the status of those request?

Arun Patidar
Level 4
May 13, 2025

Hi @shankar_k ,

 

You can confirm the below things:

1. Allow clientlibs in dispatcher filter rules.
2. Ensure that .css paths are not being redirected to /404.html or other pages in dispatcher rewrite rules.
3. Clear the cache manually (delete it from the dispatcher cache folder), or trigger a cache flush using AEM’s Publish or Flush Agent.
4. Also verify if the clientlibs are published properly.
5. Try to access the clientlib URL via Dispatcher, if you get a 404 or HTML, the issue is still there.
6. Also verify if there isn’t any "no login" redirection in Dispatcher.