Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Client libs in Apps folder

Avatar

Avatar
Validate 10
Level 3
Ricky99999
Level 3

Likes

14 likes

Total Posts

60 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back
View profile

Avatar
Validate 10
Level 3
Ricky99999
Level 3

Likes

14 likes

Total Posts

60 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back
View profile
Ricky99999
Level 3

06-09-2019

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

06-09-2019

Hi Ricky,

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

Thanks,

Bilal.

Answers (1)

Answers (1)

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

387 likes

Total Posts

869 posts

Correct Reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

387 likes

Total Posts

869 posts

Correct Reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

06-09-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