AEM 6.3 Proxy ClientLibs didn't work via dispatcher to publisher. | Community
Skip to main content
Level 2
July 25, 2017
Solved

AEM 6.3 Proxy ClientLibs didn't work via dispatcher to publisher.

  • July 25, 2017
  • 16 replies
  • 25826 views

Dear AEM Community,

I finished to update the dispatcher for allow the proxy clientlibs but it didn't load when the domain is pointing to AEM publisher.

Error  404 in browser

Error in AEM publisher

1. The dispatcher allow rule.

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

Maybe I miss come configuration.

Any help would be greatly appreciated.

Thanks,

Thomas.

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 cqsapientu69896

I solved by adding the mapping -

sling:match etc[.]clientlibs/(.+)

sling:internalRedirect /etc.clientlibs/$1

so that it matches only one character - '.' after /etc

Now both /etc/clientlibs and /etc.clientlibs requests return a response.

16 replies

cqsapientu69896
Level 4
September 5, 2017

Hi Daniel245​ ,

I am getting the same issue , the /etc.clientlibs/ libraries work when accessed on port :4503 on publish instance, but when the request is through dispatcher on port 80, there is a 404 error response and the error in publish logs is -

com.adobe.granite.ui.clientlibs.impl.ClientLibraryProxyServlet Proxy request to /etc.clientlibs/clientlibs/granite/jquery.min.js not supported.

Could you please let me know how was your issue solved, hoping for a positive reply.

Thanks

cqsapientu69896
Level 4
September 5, 2017

Ok, so the issue was with sling mappings, the mappings were appending /content/sitename in front of /etc.clientlibs

Have added a sling mapping for /etc.clientlibs , but now the normal clientlibs path - /etc/clientlibs

does not work because resource resolver converts every /etc/clientlibs  request to /etc.clientlibs

which leads to an error from clientproxy servlet.

/etc/clientlibs/foundation/jquery.min.d7c42e4a257b8b9fe38d1c53dd20d01a.js resolves to Resource=NonExistingResource, path=/etc.clientlibs/foundation/jquery.min.d7c42e4a257b8b9fe38d1c53dd20d01a.js

How can both the paths /etc/clientlibs   , and /etc.clientlibs work through sling mappings ?

kautuk_sahni
Community Manager
Community Manager
September 5, 2017

I would request you to create a new question to keep the track of your problem.

~kautuk

Kautuk Sahni
cqsapientu69896
cqsapientu69896Accepted solution
Level 4
September 7, 2017

I solved by adding the mapping -

sling:match etc[.]clientlibs/(.+)

sling:internalRedirect /etc.clientlibs/$1

so that it matches only one character - '.' after /etc

Now both /etc/clientlibs and /etc.clientlibs requests return a response.

Level 2
September 3, 2018

Thanks brace011​,

It works for both AEM 6.3, 6.4 with your solution.

P/S: We need to add these rule in an order. It should be bellow

/0064 { /type "deny" /glob "* /etc*" }

Reproduce with

--------------------

AEM 6.3, 6.4

Site content: http://aem-publish.local/content/we-retail/us/en/men.html

OS: MacOS (v10.13.3)

Apache: 2.4

Dispatcher: dispatcher-apache2.4-darwin-x86-64-4.2.2

Dispatcher setup: Adobe Experience Manager Help | Set up AEM Dispatcher on macOS

Browsers: Chrome, Safari

---------------------

Thanks @cqsapientu69896437 , It doesn't work for me with your solution.

September 3, 2019

hello,

I solved by adding the mapping -

sling:match etc[.]clientlibs/(.+)

sling:internalRedirect /etc.clientlibs/$1

so that it matches only one character - '.' after /etc

Now both /etc/clientlibs and /etc.clientlibs requests return a response

This above solution is working for me in lower environments.In prod we have multiple domains, can you please let me know if there is a way we could add it as a single regex and gets picked up for all domains?

thank you.