在一个Apache2.2.9托管网站,我想删除下面的头。
On an Apache2.2.9 hosted site, I would like to remove the headers below.
日期星期四,2010年12月16日十七时49分45秒GMT阿帕奇服务器保持活动超时= 15,上限= 92连接保持
Date Thu, 16 Dec 2010 17:49:45 GMT Server Apache Keep-Alive timeout=15, max=92 Connection Keep-Alive
让我preempt上它是否是正确的/法律/不错的remvoe服务器和日期的讨论:我已阅读标准,我还是要去做。节省的字节是显著(平均响应大小为200B〜)。
Let me preempt the discussion on whether or not it it right/legal/nice to remvoe Server and Date: I have read the standard and I still want to do it. The bytes saved are significant (average response size is ~200B).
在我site.conf(从去年apache2.conf负载)我都没有成功尝试这样的:
In my site.conf (last load from apache2.conf) I have tried this with no success:
Header unset Date Header unset Server Header unset Connection Header unset Keep-Alive其他头未设置的指令做工作(所以mod_headers中加载)。
Other Header unset directives do work (so mod_headers is loaded).
推荐答案你有没有注意到这一点的 bug报告?由于无法取消设置特定的标题是Apache的一个设计问题。连接该补丁包含一种方法来去除Server头。看着它简单地似乎lobotomizing不需要的默认其余包括头文件可以在模块做/ HTTP / http_filters.c,围绕行1000 ...
Have you noticed this bug report? The inability to unset certain headers is a design issue in Apache. The patch attached contains a way to remove the Server header. Looking at it briefly it seems that lobotomizing the rest of the unwanted default included headers can be done at modules/http/http_filters.c, around line 1000...
更多推荐
删除HTTP标头中的Apache2
发布评论