【应用服务 App Service】如何移除App Service Response Header中包含的服务器敏感信息

简介: 【应用服务 App Service】如何移除App Service Response Header中包含的服务器敏感信息

问题描述

有些情况下,当应用部署到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

 

相关文章
|
20天前
|
安全 Java 应用服务中间件
【Azure 应用服务】App Service 默认页面暴露Tomcat版本信息,存在安全风险
【Azure 应用服务】App Service 默认页面暴露Tomcat版本信息,存在安全风险
|
20天前
|
应用服务中间件 Linux 网络安全
【Azure 应用服务】App Service for Linux 环境中为Tomcat页面修改默认的Azure 404页面
【Azure 应用服务】App Service for Linux 环境中为Tomcat页面修改默认的Azure 404页面
|
20天前
|
Java 应用服务中间件 开发工具
[App Service for Windows]通过 KUDU 查看 Tomcat 配置信息
[App Service for Windows]通过 KUDU 查看 Tomcat 配置信息
|
20天前
|
Docker 容器
【Azure 应用服务】App Service for Container 无法拉取Docker Hub中的镜像替代方案
【Azure 应用服务】App Service for Container 无法拉取Docker Hub中的镜像替代方案
|
20天前
|
API C++
【Azure 应用服务】Azure Function App在部署时候遇见 503 ServiceUnavailable
【Azure 应用服务】Azure Function App在部署时候遇见 503 ServiceUnavailable
|
20天前
|
网络协议
【Azure 应用服务】Azure Data Factory中调用Function App遇见403 - Forbidden
【Azure 应用服务】Azure Data Factory中调用Function App遇见403 - Forbidden
|
20天前
|
API
【Azure 应用服务】当在Azure App Service的门户上 Log Stream 日志无输出,需要如何操作让其输出Application Logs呢?
【Azure 应用服务】当在Azure App Service的门户上 Log Stream 日志无输出,需要如何操作让其输出Application Logs呢?
|
20天前
|
Kubernetes Linux Docker
【Azure 应用服务】使用Docker Compose创建App Service遇见"Linux Version is too long. It cannot be more than 4000 characters"错误
【Azure 应用服务】使用Docker Compose创建App Service遇见"Linux Version is too long. It cannot be more than 4000 characters"错误
|
20天前
|
数据中心 容器
【Azure 应用服务】在创建App Service时,遇见“No available instances to satisfy this request. App Service is attempting to increase capacity.”错误
【Azure 应用服务】在创建App Service时,遇见“No available instances to satisfy this request. App Service is attempting to increase capacity.”错误
|
20天前
|
存储 网络安全 数据中心
【Azure 应用服务】Function App / App Service 连接 Blob 报错
【Azure 应用服务】Function App / App Service 连接 Blob 报错