Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Serve all js files from proxy server

Avatar

Level 1

I would like not only to proxy to a custom nodejs server for the body of the page, but also a subset of  javascript files in the app.  How can I configure AEM to do this?

If this were sitting behind an nginx server I would just instruct it to proxy all calls to _next/runtime/**/*.js to the proxy server, while serving etc/clientLib/**/*/js calls as per normal (from AEM).  Is it possible to do this?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hm, that's not that easy to solve. I would try to use the Sling mappings to map the path of the resources to a different path. My guess is that it should work, but haven't tried it yet myself.

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hm, that's not that easy to solve. I would try to use the Sling mappings to map the path of the resources to a different path. My guess is that it should work, but haven't tried it yet myself.

Avatar

Employee

Hi @djkramnik

I agree with Mr. Joerg Hoh's comment idea of using sling mapping. You can refer to documentation [1] to go over the details and information on how to implement it.

Regards,

Swaroop

[1]  Resource Mapping

Avatar

Level 1

Ultimately I created a sling mapping that maps the path I wanted to proxy to a servlet, that actually makes the proxy call to nodejs.  It works, but interested if you have any thoughts on this approach.