web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. seo教程
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站

AppScan检测“X-XSS-Protection”头缺失或不安全等问题解决方案

681 ℃
     

问题描述:用AppScan检测检查网页安全性能,出现以下问题:

1、检测到隐藏目录
2、缺少“Content-Security-Policy”头
3、缺少“X-Content-Type-Options”头
4、缺少“X-XSS-Protection”头

web建站小编用的是IIS服务器,在项目文件夹下面新建一个web.config文件,写入以下代码:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpProtocol>
            <customHeaders>
<add name="Content-Security-Policy" value="default-src *;style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';img-src * data:;worker-src * blob:;font-src 'self' data:;" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="X-XSS-Protection" value="1" />
           </customHeaders>
        </httpProtocol>
        <httpErrors>
            <remove statusCode="403" subStatusCode="-1" />
            <error statusCode="403" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="404.htm" responseMode="File" />
        </httpErrors>
    </system.webServer>
</configuration>

nginx项目缺失“Content-Security-Policy”等安全问题解决方案

appscan软件检测到隐藏目录漏洞IIS解决方法

AppScan扫描js报缺少Content-Security-Policy等安全漏洞问题解决方案

标签: appscan

上面是“AppScan检测“X-XSS-Protection”头缺失或不安全等问题解决方案”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_1911.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > vuejs
本文共计878个字,预计阅读时长6分钟
生活小工具,收录了80多款小工具
上一篇: 介绍几款带有中国风古韵的免费可商用中文字体
下一篇: 推荐9款支持 Vue3 免费开源的前端 UI 组件库
x 打工人ai神器