Hi all,
We are working on a use case where we must cache a proxy request. For example, we have a path /us/en/load (sample path) where we pass through this request from the dispatcher to a third-party back-end server (which is not AEM).
RewriteRule /us/en/load https://third-party-server/us/en/load [PT, NC, L]
We also have multiple paths like these so that any leads would be greatly appreciated.
The subsequent resources of the page(s), like images, CSS, and JS everything, come with a folder like /_identifier/static/front-end.css so we need to cache this /_identifier/static folder too in the dispatcher.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Please try using LocationMatch to cache third-party content
<LocationMatch "/flights.json">
RewriteEngine on
ProxyPass "${HOST1}flights.json"
RequestHeader set X-System-ID DEV_AEM
RequestHeader set X-Application-Key "${DEV_AEM_APPLICATION_KEY}"
ProxyPassReverse "${HOST1}flights.json"
</LocationMatch>
https://techrevel.blog/2024/06/09/aem-reverse-proxy/
Please try using LocationMatch to cache third-party content
<LocationMatch "/flights.json">
RewriteEngine on
ProxyPass "${HOST1}flights.json"
RequestHeader set X-System-ID DEV_AEM
RequestHeader set X-Application-Key "${DEV_AEM_APPLICATION_KEY}"
ProxyPassReverse "${HOST1}flights.json"
</LocationMatch>
https://techrevel.blog/2024/06/09/aem-reverse-proxy/