Update default

master
Edwin Lyon 3 years ago committed by GitHub
parent 909a2790fc
commit 4abb2ecb9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      nginx/default

@ -4,15 +4,15 @@ server {
server_name _;
root /dev/null;
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|im.thelyoncompany.com|conference.im.thelyoncompany.com|proxy.im.thelyoncompany.com|pubsub.im.thelyoncompany.com|upload.im.thelyoncompany.com|matrix.thelyoncompany.com|thelyoncompany.com)$ ) {
return 444;
}
location / {
return 301 https://$host$request_uri;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "no-referrer-when-downgrade";
return 301 https://$host$request_uri;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "no-referrer-when-downgrade";
}
}
@ -26,11 +26,12 @@ server {
ssl_certificate_key /etc/letsencrypt/live/email.thelyoncompany.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/email.thelyoncompany.com/chain.pem;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
include /etc/nginx/snippets/ssl.conf;
add_header Strict-Transport-Security "max-age=31536000";
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|im.thelyoncompany.com|conference.im.thelyoncompany.com|proxy.im.thelyoncompany.com|pubsub.im.thelyoncompany.com|upload.im.thelyoncompany.com|matrix.thelyoncompany.com|thelyoncompany.com)$ ) {
return 444;
}
@ -43,4 +44,3 @@ server {
add_header Referrer-Policy "no-referrer-when-downgrade";
}
}

Loading…
Cancel
Save