|
|
@ -10,6 +10,11 @@ server { |
|
|
|
|
|
|
|
|
|
|
|
location / { |
|
|
|
location / { |
|
|
|
return 301 https://$host$request_uri; |
|
|
|
return 301 https://$host$request_uri; |
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000"; |
|
|
|
|
|
|
|
add_header X-Content-Type-Options nosniff; |
|
|
|
|
|
|
|
add_header X-XSS-Protection "1; mode=block"; |
|
|
|
|
|
|
|
add_header Referrer-Policy "no-referrer-when-downgrade"; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -23,6 +28,7 @@ server { |
|
|
|
ssl_certificate_key /etc/letsencrypt/live/email.thelyoncompany.com/privkey.pem; |
|
|
|
ssl_certificate_key /etc/letsencrypt/live/email.thelyoncompany.com/privkey.pem; |
|
|
|
ssl_trusted_certificate /etc/letsencrypt/live/email.thelyoncompany.com/chain.pem; |
|
|
|
ssl_trusted_certificate /etc/letsencrypt/live/email.thelyoncompany.com/chain.pem; |
|
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; |
|
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; |
|
|
|
|
|
|
|
include /etc/nginx/snippets/letsencrypt.conf; |
|
|
|
|
|
|
|
|
|
|
|
if ($host !~ ^(autoconfig.thelyoncompany.com|autodiscover.thelyoncompany.com|webmail.thelyoncompany.com|email.thelyoncompany.com|matrix.thelyoncompany.com|thelyoncompany.com)$ ) { |
|
|
|
if ($host !~ ^(autoconfig.thelyoncompany.com|autodiscover.thelyoncompany.com|webmail.thelyoncompany.com|email.thelyoncompany.com|matrix.thelyoncompany.com|thelyoncompany.com)$ ) { |
|
|
|
return 444; |
|
|
|
return 444; |
|
|
@ -32,6 +38,11 @@ server { |
|
|
|
|
|
|
|
|
|
|
|
location / { |
|
|
|
location / { |
|
|
|
return 301 https://$host$request_uri; |
|
|
|
return 301 https://$host$request_uri; |
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000"; |
|
|
|
|
|
|
|
add_header X-Content-Type-Options nosniff; |
|
|
|
|
|
|
|
add_header X-XSS-Protection "1; mode=block"; |
|
|
|
|
|
|
|
add_header Referrer-Policy "no-referrer-when-downgrade"; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|