我已经安装了一个鱿鱼服务器,我希望它在查看标题时被隐藏。
首先,我得到了鱿鱼和标题上的版本:
curl -i ip_address HTTP/1.0 400 Bad Request Server: squid/3.1.10 Mime-Version: 1.0 Date: Wed, 04 Feb 2015 18:58:06 GMT Content-Type: text/html Content-Length: 3157 X-Squid-Error: ERR_INVALID_URL 0 Vary: Accept-Language Content-Language: en X-Cache: MISS from host.example.com X-Cache-Lookup: NONE from host.example.com:80 Via: 1.0 host.example.com (squid/3.1.10) Connection: close
然后在/etc/squid/squid.conf中设置下面的指令:
httpd_suppress_version_string on
而现在我没有得到鱿鱼版本:
HTTP/1.0 400 Bad Request Server: squid Mime-Version: 1.0 Date: Wed, 04 Feb 2015 19:11:06 GMT Content-Type: text/html Content-Length: 13 X-Squid-Error: ERR_INVALID_URL 0 Vary: Accept-Language Content-Language: en X-Cache: MISS from host.example.com X-Cache-Lookup: NONE from host.example.com:80 Via: 1.0 host.example.com (squid) Connection: close
但是我想从头文件中隐藏鱿鱼。
当我尝试使用机器作为代理时,我得到相同的结果,通过使用fi:
curl -i -x http://user:password@ip_address:80 http://iplocation.net
我试过这个问题的解决scheme,但它不工作。
有什么build议么?
提前致谢。
如果你的鱿鱼configuration了“–enable-http-violations”,请select回复标题replace选项。 例:
reply_header_replace服务器Foo / 1.0
reply_header_access X-Squid-Error deny all