Serve all js files from proxy server | Community
Skip to main content
July 29, 2019
Solved

Serve all js files from proxy server

  • July 29, 2019
  • 3 replies
  • 1792 views

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?

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 joerghoh

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.

3 replies

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
July 31, 2019

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.

Adobe Employee
July 31, 2019

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

August 8, 2019

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.