Client libs in Apps folder | Community
Skip to main content
Ricky99999
Level 4
September 6, 2019
Solved

Client libs in Apps folder

  • September 6, 2019
  • 2 replies
  • 2263 views

Hi team

Recently we are migrating to 6.5 earlier we keep all scripts related to UI in etc/clientlibs

As part of security we won't allow apps folder to end user. So how client libs is loading for end user.

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 bilal_ahmad

Hi Ricky,

Add a property 'allowProxy="{Boolean}true"' to the cq:ClientLibraryFolder and that would do the job.

Thanks,

Bilal.

2 replies

bilal_ahmad
bilal_ahmadAccepted solution
Level 5
September 6, 2019

Hi Ricky,

Add a property 'allowProxy="{Boolean}true"' to the cq:ClientLibraryFolder and that would do the job.

Thanks,

Bilal.

Adobe Employee
September 6, 2019

In order for the client libraries under /apps to be accessible, a proxy servelt is used. The ACLs are still enforced on the client library folder, but the servlet allows for the content to be read via /etc.clientlibs/ if the allowProxy property is set to true.

A static resource can only be accessed via the proxy, if it resides below a resource below the client library folder.

As an example:

  • You have a clientlib in /apps/myproject/clientlibs/foo
  • You have a static image in /apps/myprojects/clientlibs/foo/resources/icon.png

Then you set the allowProxy property on foo to true.

  • You can then request /etc.clientlibs/myprojects/clientlibs/foo.js
  • You can then reference the image via /etc.clientlibs/myprojects/clientlibs/foo/resources/icon.png