Skip to content

Instantly share code, notes, and snippets.

@h1z3y3
Created December 21, 2021 06:17
Show Gist options
  • Save h1z3y3/5cf1e468cc6b0813a83eccecd1597a40 to your computer and use it in GitHub Desktop.
Save h1z3y3/5cf1e468cc6b0813a83eccecd1597a40 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name .example.com
return 301 https://example.com
}
server {
listen 443 ssl;
server_name .example.com
# other ssl configrations
ssl_...
# HSTS
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment