Missing HTTP Strict-Transport-Security Header (HSTS) 解決


HSTS簡介

HSTS(HTTP Strict Transport Security)是國際互聯網工程組織IETF發布的一種互聯網安全策略機制。
采用HSTS策略的網站將保證瀏覽器始終連接到該網站的HTTPS加密版本,不需要用戶手動在URL地址欄中輸入加密地址,以減少會話劫持風險。
server {
    listen 443 ssl;
    server_name www.xx.com;

   add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
}

 

參考:
https://www.nginx.com/blog/http-strict-transport-security-hsts-and-nginx/

http://www.sohu.com/a/146282947_760387

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM