【发布时间】:2019-02-05 09:30:36
【问题描述】:
我在我的 apache/conf/httpd.conf 文件中添加了以下行来解决 XSS 跨站脚本漏洞。
1)
<IfModule mod_headers.c>
# (1) (2)
Header set X-XSS-Protection "1; mode=block"
# `mod_headers` cannot match based on the content-type, however,
# the `X-XSS-Protection` response header should be sent only for
# HTML documents and not for the other resources.
<FilesMatch "\.(%FilesMatchPattern%)$">
Header unset X-XSS-Protection
</FilesMatch>
</IfModule>
2 ) header always set x-xss-protection "1; mode=block"
3) <IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
</IfModule>
使用以下命令重新启动 apache 服务器
httpd -k 重启
但是他们都没有成功,IBM BAVA 安全扫描仍然显示(跨站点脚本)是积极的,并且 Web 服务器漏洞仍然存在。
【问题讨论】:
标签: apache