Expand my Community achievements bar.

SOLVED

Clientlib css not loading in Dispatcher only

Avatar

Level 2

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-d41d8cd98f00b204e...' 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 

 

Shankar_K_0-1747075319078.png

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

AEM LinksLinkedIn

View solution in original post

6 Replies

Avatar

Level 4

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

Avatar

Community Advisor

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

AEM LinksLinkedIn

Avatar

Level 2

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??

 

Avatar

Correct answer by
Community Advisor

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

AEM LinksLinkedIn

Avatar

Level 2

Hi Everyone ,
the issue was with CDN as expected  we cleared CDN cache it didnt work , then we tried to clear the entire cache (purge cache) it worked 

Thanks 

Avatar

Level 4

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.