我正在使用OWASP进行应用程序扫描,并得到了这份报告。我想的是,配置就是在所有响应头中包括头,它有一种方法。提前感谢你所有的回答。
建议的解决方案:为web服务器直接提供的资源(javascript、css等)设置“x-content-type-options:nosniff”标头。这可以通过服务器配置来完成,因此可能涉及到文档更新。
受影响的URL/资源:https://css-acme-tst.usmt0520.lpc.lawson.com/sso/domain.js https://css-acme-tst.usmt0520.lpc.lawson.com/sso/login.css
到目前为止我所做的。
我做的是这个。我把标记放在注释掉属性modules/mod_headers.so之后,重新启动appserver,但仍然是相同的响应头。
LoadModule headers_module modules/mod_headers.so
<Directory mod_headers.c>
Header always set X-Content-Type-Options nosniff
</Directory>
尝试将其放入IfModule或VirtualHost中。
我试过这个,效果很好:
LoadModule headers_module modules/mod_headers.so
<IfModule mod_headers.c>
Header always set X-Content-Type-Options nosniff
</IfModule>