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?)' }
}
Solved! Go to Solution.
Views
Replies
Total Likes
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.
You could try something like this:-
/0012 { /type "allow" /path "/etc*" /extension "clientlibs" /suffix "{suffix}" }
Hope this helps!
Regards,
Nitesh
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.
You could try something like this:-
/0012 { /type "allow" /path "/etc*" /extension "clientlibs" /suffix "{suffix}" }
Hope this helps!
Regards,
Nitesh
Okay, that makes sense actually. Because of the dot, it *thinks* clientlibs is an extension. Let me give that a try.
@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's answer.
Yes, very helpful! Broke my URL down just like the suggested rule. Thanks!
That does indeed work. So I have:
/0015 { /type "allow" /url "/etc*" /extension "clientlibs" /suffix "/foundation/*.css" } /0016 { /type "allow" /url "/etc*" /extension "clientlibs" /suffix "/foundation/*.js" }
It would be nice to combine these into one rule like:
/0015 { /type "allow" /url "/etc*" /extension "clientlibs" /suffix '(/foundation/*.css|/foundation/*.js)' }
But that doesn't work. Thoughts?
@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/*" }
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/*" }
Views
Likes
Replies