Re: "pre-treating" documents from certain remote URLs before a web browser renders them
On Tue, 15 May 2018 14:52:16 +0300
Reco <recoverym4n@gmail.com> wrote:
> Hi.
>
> On Tue, May 15, 2018 at 12:58:04AM +0000, davidson wrote:
> > I would like to launch a web browser[3], browse pages at domain X, and
> > know that when I go to http://X/page, or https://X/page, etc, the
> > browser will render not the page served from the remote site, but will
> > render instead that page as transformed by the appropriate stylesheet
> > tailored for pages from X.
>
> I can think of two things that can do the job:
>
> 1) HTTP proxy.
>
> Squid may be able to pull the trick you want, but I'm unsure of that.
> Nginx (configured as a conventional proxy) can do it via
> mod-http-xslt-filter, but writing nginx.conf for this will be a PITA.
You want privoxy. Insofar as you can script your transformation,
configure privoxy, using its "external-filter" action, to apply your
script to the appropriate pages:
https://www.privoxy.org/user-manual/actions-file.html
[section "8.5.14. external-filter"]
Celejar
Reply to: