nginx: Enable HSTS

pull/53/head
Tristan Daniël Maat 2021-10-12 13:53:08 +01:00
parent d6e1cd3ffa
commit 3bdbe66fe4
Signed by: tlater
GPG Key ID: 49670FD774E43268
1 changed files with 4 additions and 1 deletions

View File

@ -63,7 +63,10 @@
lib.recursiveUpdate {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; };
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
extraConfig = ''
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
'';
} extra;
domain = config.services.nginx.domain;
in {