Nginx教程

nginx漏扫响应头缺失

本文主要是介绍nginx漏扫响应头缺失,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

 

http {

(1)HTTP Strict-Transport-Security缺失
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
(2)web漏洞-缺少X-Frame-Options标头
add_header X-Frame-Options SAMEORIGIN;
(3)HTTP Content-Security-Policy 响应头缺失
add_header Content-Security-Policy "default-src 'self'; style-src * 'unsafe-inline'; img-src * data:; object-src 'self'; script-src * 'unsafe-eval' 'unsafe-inline'; font-src * data:; worker-src * blob:;";
(4)HTTP Referrer-Policy 响应头缺失
add_header Referrer-Policy "origin-when-crossorigin";
add_header 'Referrer-Policy' 'origin';
add_header 'Referrer-Policy' 'unsafe-url';
(5)HTTP X-Permitted-Cross-Domain-Policies 响应头缺失
add_header X-Permitted-Cross-Domain-Policies value;
(6)HTTP X-XSS-Protection 响应头缺失
add_header X-XSS-Protection 1;
(7)HTTP X-Download-Options 响应头缺失
add_header X-Download-Options "noopen" always;
(8)HTTP X-Content-Type-Options 响应头缺失
add_header X-Content-Type-Options nosniff;

}

 

这篇关于nginx漏扫响应头缺失的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!