关于nginx HTTP Strict Transport Security (HSTS) Policy Not Enabled 的处理

添加证书 和强制https 策略

 

ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";

 

posted @ 2024-10-22 13:53  小清澈  阅读(132)  评论(0编辑  收藏  举报