开发者

Using Squid to append text to HTTP responses on demand

开发者 https://www.devze.com 2023-02-28 15:26 出处:网络
开发者_如何学运维I am trying to setup a http proxy, but sadly I don\'t really know what I\'m doing.
开发者_如何学运维

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

精彩评论

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