Response Content Modifications

Bob MacCallum r.maccallum at imperial.ac.uk
Mon Mar 1 11:16:25 CET 2010


Apache's mod_substitute may be what you want.

I use it to add Google analytics javascript to HTML from back end services
(tomcat) served through Apache ProxyPass.  Search for </body> replace with
<script ... ></body>

Just make sure you get a recent version with the memory leak fixed.


Moshe Kaplan writes:
 > No, This is a clear case of system integration,
 > 
 > In many production systems, you cannot change the code itself, since it involves in major risks (when you change a single line of code, you never know where do you end at). However, several methods of reverse proxy can still can be very useful in these systems.
 > 
 > I'll be glad for a reference in the code, and will glad to contribute to the code base if it is needed to accomplish this task.
 > 
 > On Sun, Feb 28, 2010 at 7:06 PM, Poul-Henning Kamp <phk at phk.freebsd.dk<mailto:phk at phk.freebsd.dk>> wrote:
 > In message <c3623d231002280600v61c38ae4vaa41bc8e972da44d at mail.gmail.com<mailto:c3623d231002280600v61c38ae4vaa41bc8e972da44d at mail.gmail.com>>, Moshe
 >  Kaplan writes:
 > 
 > >The target is to modify the received content from the backend (for example
 > >changing embedded URLs in HTML, removing parts of the content based on
 > >regular expressions and so on).
 > >
 > >P.S. I don't have control on the back end content, so I cannot use esi.
 > 
 > Sorry for asking a point blank rude question, but what you describes
 > sounds like theft of copyrighted content from somebody else.
 > 
 > Do you have the necessary legal rights to use the contents on the backend ?
 > 
 > Poul-Henning
 > 
 > --
 > Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
 > phk at FreeBSD.ORG         | TCP/IP since RFC 956
 > FreeBSD committer       | BSD since 4.3-tahoe
 > Never attribute to malice what can adequately be explained by incompetence.
 > 
 > <div dir="ltr">No, This is a clear case of system integration,<br><br>In many production systems, you cannot change the code itself, since it involves in major risks (when you change a single line of code, you never know where do you end at). However, several methods of reverse proxy can still can be very useful in these systems.<br>
 > <br>I'll be glad for a reference in the code, and will glad to contribute to the code base if it is needed to accomplish this task.<br><br><div class="gmail_quote">On Sun, Feb 28, 2010 at 7:06 PM, Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk at phk.freebsd.dk">phk at phk.freebsd.dk</a>></span> wrote:<br>
 > <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In message <<a href="mailto:c3623d231002280600v61c38ae4vaa41bc8e972da44d at mail.gmail.com">c3623d231002280600v61c38ae4vaa41bc8e972da44d at mail.gmail.com</a>>, Moshe<br>
 > 
 > <div class="im"> Kaplan writes:<br>
 > <br>
 > >The target is to modify the received content from the backend (for example<br>
 > >changing embedded URLs in HTML, removing parts of the content based on<br>
 > >regular expressions and so on).<br>
 > ><br>
 > >P.S. I don't have control on the back end content, so I cannot use esi.<br>
 > <br>
 > </div>Sorry for asking a point blank rude question, but what you describes<br>
 > sounds like theft of copyrighted content from somebody else.<br>
 > <br>
 > Do you have the necessary legal rights to use the contents on the backend ?<br>
 > <br>
 > Poul-Henning<br>
 > <font color="#888888"><br>
 > --<br>
 > Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20<br>
 > phk at FreeBSD.ORG         | TCP/IP since RFC 956<br>
 > FreeBSD committer       | BSD since 4.3-tahoe<br>
 > Never attribute to malice what can adequately be explained by incompetence.<br>
 > </font></blockquote></div><br></div>
 > _______________________________________________
 > varnish-dev mailing list
 > varnish-dev at projects.linpro.no
 > http://projects.linpro.no/mailman/listinfo/varnish-dev

-- 
Bob MacCallum | VectorBase Developer | Kafatos/Christophides Groups |
Division of Cell and Molecular Biology | Imperial College London |
Phone +442075941945 | Email r.maccallum at imperial.ac.uk



More information about the varnish-dev mailing list