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

小清澈 / 2024-11-09 / 原文

添加证书 和强制https 策略

 

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