出于安全目的,我们希望te从所有网站上删除"服务器"标头。但是,我们在ADFS 3.0网站上没有成功。我们已经尝试使用" disableserverheader" reg键将其删除:
查看reg键的屏幕截图
我们已将其应用于以下服务器:
- ADFS服务器
- 运行Web应用程序代理的服务器
- 运行ASP.NET网站的服务器
连续,我们重新启动了服务器。此外,我们已经在global.asax中的ASP.NET网站上添加了以下代码:
protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpApplication application = sender as HttpApplication;
application?.Context?.Response.Headers.Remove("Server");
}
查看响应标头的屏幕截图
adfs 3.0不在IIS上运行,并且ADF通常没有操纵标头的设施。
这样做的唯一方法是将代理放在ADF的面前并在此处进行。