Created
July 22, 2013 20:24
-
-
Save tim-peterson/6057327 to your computer and use it in GitHub Desktop.
Make https mandatory without 301 redirect on Nginx using Strict-Transport-Security
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http{ | |
server { | |
listen 443 ssl; | |
ssl on; | |
ssl_certificate /etc/ssl/my_site.pem; | |
ssl_certificate_key /etc/ssl/my_site.key; | |
server_name my_site.com; | |
add_header Strict-Transport-Security "max-age=262974383"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment