Dispatcher Extension Restrictions for /etc.clientlibs Paths | Community
Skip to main content
AEM_Dan
Level 3
January 11, 2023
Solved

Dispatcher Extension Restrictions for /etc.clientlibs Paths

  • January 11, 2023
  • 2 replies
  • 2155 views

I can't get filter extension restrictions to work for /etc.clientlibs paths. I'm guessing because it is a proxied path and not a physical path. Is this even possible? Here is my config:

 

 

/filter { # Deny everything first and then allow specific entries /0001 { /type "deny" /glob "*" } #This works /0010 { /type "allow" /url "/etc/designs/myapp/*" /extension '(css|js|ai|bmp|gif|ico|jpe?g|png|ps|psd|svg|tiff?)' } /0011 { /type "allow" /url "/etc/designs/myapp-lib/*" /extension '(css|js|ai|bmp|gif|ico|jpe?g|png|ps|psd|svg|tiff?)' } #This does not work /0012 { /type "allow" /url "/etc.clientlibs/clientlibs/*" /extension '(css|js|woff2?)' } /0013 { /type "allow" /url "/etc.clientlibs/granite/*" /extension '(css|js|woff2?)' } /0014 { /type "allow" /url "/etc.clientlibs/wcm/*" /extension '(css|js|woff2?)' } /0015 { /type "allow" /url "/etc.clientlibs/foundation/*" /extension '(css|js|woff2?)' } /0016 { /type "allow" /url "/etc.clientlibs/cq/personalization/*" /extension '(css|js|woff2?)' } }

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by nitesh_kumar-1

Hi @aem_dan ,


Yes, and It's also about how the URL decomposition works on the dispatcher. This document has some details about the full dissection of URLs by the dispatcher.

https://experienceleague.adobe.com/docs/experience-manager-learn/dispatcher-tutorial/chapter-1.html?lang=en#overview 

 

You could try something like this:-

/0012 { /type "allow" /path "/etc*" /extension "clientlibs" /suffix "{suffix}" }

 

Hope this helps!

Regards,
Nitesh

2 replies

nitesh_kumar-1
Adobe Employee
nitesh_kumar-1Adobe EmployeeAccepted solution
Adobe Employee
January 11, 2023

Hi @aem_dan ,


Yes, and It's also about how the URL decomposition works on the dispatcher. This document has some details about the full dissection of URLs by the dispatcher.

https://experienceleague.adobe.com/docs/experience-manager-learn/dispatcher-tutorial/chapter-1.html?lang=en#overview 

 

You could try something like this:-

/0012 { /type "allow" /path "/etc*" /extension "clientlibs" /suffix "{suffix}" }

 

Hope this helps!

Regards,
Nitesh

AEM_Dan
AEM_DanAuthor
Level 3
January 11, 2023

Okay, that makes sense actually.  Because of the dot, it *thinks* clientlibs is an extension.  Let me give that a try.

cshawaus
Level 2
January 12, 2023

@aem_dan AEM has a built-in tool that allows you to see this breakdown. I have used it countless times to sanity-check URL structures like ClientLibs.

http://localhost:4502/system/console/servletresolver

Hope that helps in addition to @nitesh_kumar-1's answer.

Shashi_Mulugu
Community Advisor
Community Advisor
January 11, 2023

@aem_dan seems to be correct, few things to confirm, can you make sure this filter.any file is mapped correctly to publish farm which is getting executed ?

 

 

 

Second, can you try removing Extension restrictions and try based on url Only?

 

 

 

Third, is this full filter.any file or anything else you have, if possible post full file?

 

 

 

Here is the AEM Archetype dispatcher filter rule which works perfectly fine

 

 

 

# Enable clientlibs proxy servlet

 

 

 

/0013 { /type "allow" /method "GET" /url "/etc.clientlibs/*" }

 

 

 

 

 

 

 

 

 

https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/dispatcher.ams/src/conf.dispatcher.d/filters/ams_publish_filters.any

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AEM_Dan
AEM_DanAuthor
Level 3
January 11, 2023

I have everything in just 1 dispatcher.any file and the other filters are working fine so I don't have any reason to believe it's not getting executed on the correct farm.  Plus this does work perfectly fine:

/0012 { /type "allow" /url "/etc.clientlibs/clientlibs/*" }