删除HTTP标头中的Apache2

编程入门 行业动态 更新时间:2024-10-25 12:24:50
本文介绍了删除HTTP标头中的Apache2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在一个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

本文发布于:2023-11-09 15:57:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572796.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:HTTP   标头中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!