add mta-sts

This commit is contained in:
XenGi 2026-05-07 13:29:33 +02:00
parent 049fcb73c9
commit 9a1eed241f
Signed by: xengi
SSH key fingerprint: SHA256:jxWM2RTHvxxcncXycwwWkP7HCWb4VREN05UGJTbIPZg

View file

@ -10,6 +10,21 @@ in
]; ];
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"mta-sts.${config.networking.domain}" = {
quic = true;
kTLS = true;
forceSSL = true;
enableACME = true;
extraConfig = ''
add_header Strict-Transport-Security max-age=15768000;
'';
locations."= /.well-known/mta-sts.txt" = {
alias = "/srv/http/mta-sts.txt";
extraConfig = ''
default_type text/plain;
'';
};
};
"www.${config.networking.domain}" = { "www.${config.networking.domain}" = {
default = true; default = true;
serverAliases = [ config.networking.domain ]; serverAliases = [ config.networking.domain ];