2017-05-30 56 views
1

为了安全起见,我们要从所有网站中删除“Server”标头。但是,我们的ADFS 3.0网站并未取得成功。我们已经尝试过使用“DisableServerHeader” REG键将其删除:删除ADFS 3.0中的“Server”标头

View a screenshot of the reg key

我们已经在以下服务器上应用此:

  • ADFS服务器
  • 服务器上运行的Web应用程序代理
  • 运行ASP.NET网站的服务器

接下来,我们重新启动了服务器。此外,我们还加入了下面的代码我们ASP.NET网站在Global.asax:

protected void Application_BeginRequest(object sender, EventArgs e) 
{ 
    HttpApplication application = sender as HttpApplication; 
    application?.Context?.Response.Headers.Remove("Server"); 
} 

View a screenshot of the response headers

回答

1

ADFS 3.0不IIS和ADFS总体运行没有任何设施,以操纵头。

要做到这一点的唯一方法是将代理放在ADFS前面并在那里执行。