问题描述

有些情况下,当应用部署到App Service上后,在有些Response Header中,可以看见关于服务器的一些信息,这样会导致隐藏的安全问题,所以可以在web.config中移除某些关键的Header信息。如X-Powered-By。

解决方案

在web.config中的httpProtocol中使用remove name来移除需要的header。

<?xml version="1.0" encoding="UTF-8"?>             
<configuration>
    <system.webServer>      
        <httpProtocol>
            <customHeaders>
                <remove name="X-Powered-By" />
            </customHeaders>
        </httpProtocol>
    </system.webServer>
</configuration>

 

另一种保护App Service的机制可以添加Applicaiton Gateway。 如要使用App Gateway可以参考文档:https://docs.azure.cn/zh-cn/application-gateway/configure-web-app-portal

 

相关文章:

  • 2021-06-19
  • 2021-09-25
  • 2022-12-23
  • 2020-10-27
  • 2022-12-23
  • 2021-09-05
  • 2020-10-25
  • 2021-08-02
猜你喜欢
  • 2021-08-17
  • 2020-11-16
  • 2021-05-20
  • 2021-07-21
  • 2021-03-13
  • 2021-05-20
  • 2020-10-28
相关资源
相似解决方案