开发者

Using Squid to append text to HTTP responses on demand

开发者_如何学运维

I am trying to setup a http proxy, but sadly I don't really know what I'm doing.

The primary function of this proxy will be to append a javascript file to the bottom of any web request if a certain parameter is present in the Query String.

For example, if I had Firefox setup to go through the proxy, if i went to http://www.anypage.com/?enable_script=true the following line would be present at the bottom of the source:

<script type="text/javascript" src="http://localhost/script.js"></script>

I have played aroudn with Squid a little, it appears to be able to do what I need but documentation is limited and I'm not sure where to start.

Thanks!


You should start by reading http://wiki.squid-cache.org/SquidFaq/ContentAdaptation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜