logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: rewrite JSON/XML response possible?
Author
simkin



Joined: 20 Sep 2013
Posts: 4
Location: NL

PostPosted: Tue 21 Oct '14 9:40    Post subject: rewrite JSON/XML response possible? Reply with quote

I have setup a reverse proxy that allows users to query an internal server. That internal server returns a JSON or XML response.
In that response some URLS need to be rewritten as they cannot be resolved externally. Is it possible to rewrite JSON/XML response bodies?
I experimented with "ProxyHTMLURLMap 1.1.1.1 2.2.2.2" but that did not work (seems to ignore the JSON response entirely)

Any advise/suggestion is very welcome!
Back to top
maba



Joined: 05 Feb 2012
Posts: 64
Location: Germany, Heilbronn

PostPosted: Wed 22 Oct '14 20:29    Post subject: Reply with quote

I am not sure to what degree you are trying to rewrite your body content. Whether it is full XML / JSON processing and transforming to HTML or just a simple string replacement.

Anyway you might want to take a look at mod_substitute. It can do body manipulation at the expense of a performance loss (obviously). Not an ideal solution.
Back to top


Reply to topic   Topic: rewrite JSON/XML response possible? View previous topic :: View next topic
Post new topic   Forum Index -> Apache