Skip to content

Instantly share code, notes, and snippets.

@envygeeks
Last active February 12, 2019 18:27
Show Gist options
  • Save envygeeks/92fd607bf0a4bd8c7faf5d28c273ddb2 to your computer and use it in GitHub Desktop.
Save envygeeks/92fd607bf0a4bd8c7faf5d28c273ddb2 to your computer and use it in GitHub Desktop.
[HSTS Nginx -> HTTPS] #nginx
server {
server_name _;
rewrite ^(.*) https://$host$1 permanent;
listen 80;
}
server {
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment