May 15, 2020
Estimated Post Reading Time ~

Embedding Resources in Proxied Client Libraries

If you’re planning on moving towards Adobe Experience Managers recommended pattern for clientlibs in AEM 6.3+, by storing all clientlibs in ‘/apps’ and setting ‘allowProxy=“{Boolean}true”’ so that they will be proxied by the new ‘/etc.clientlibs/’ servlet, you must store referenced assets (like images) under a folder named ‘resources’. Although this is not explicitly stated in the documentation, using any other folder name will not work.


As you can see in the image above, the Using Client-Side Libraries documentation examples DO use this pattern, but they don’t make any explicit statements regarding the folder naming requirements. When trying to use a folder named ‘assets’, all requests were simply generating 404s. It took me a moment to find out why. It appears that there is a debug flag you can enable which should bypass the restriction of being called ‘resources’, though that’s obviously not a long-term fix.
Joey Smith has submitted a couple of tickets with Adobe Support to address this issue. You can contact Adobe support and ask to be notified when the issue CQDOC-12969 is fixed to track this documentation bug. He has also filed a request with Adobe to allow this folder name to be configured via a sling:osgiConfig. When these are dealt with, we will update everyone



Source: https://aemhq.com/posts/embedding-resources-in-proxied-clientlibraries/


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.