appscan 扫描出漏洞 Content-Security-Policy中缺少Style-Src或Default-src策略或相应策略不安全服务器的域名为https1721615878444并且允许https1721615878090访问如何通过nginx处理
可以通过在nginx配置文件中添加以下内容来解决该漏洞:
add_header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval'; style-src https: 'unsafe-inline';";
这将为Content-Security-Policy添加默认源和样式源,以确保安全性。同时,还需要在nginx配置文件中添加以下内容,以允许https://172.16.15.87:8090访问:
location / {
add_header 'Access-Control-Allow-Origin' 'https://172.16.15.87:8090';
add_header 'Access-Control-Allow-Credentials' 'true';
#其他配置项
}
这将允许https://172.16.15.87:8090访问该服务器,并允许传递凭据。然后重新启动nginx服务,使配置生效。
原文地址: https://www.cveoy.top/t/topic/g7Ng 著作权归作者所有。请勿转载和采集!