diff --git a/system/nixos/mastodon.nix b/system/nixos/mastodon.nix index b50a4ed..a343aa4 100644 --- a/system/nixos/mastodon.nix +++ b/system/nixos/mastodon.nix @@ -117,6 +117,10 @@ in extraConfig = '' add_header Access-Control-Allow-Origin https://mastodon.kempkens.io; + + if ($ssl_protocol != "") { + add_header Strict-Transport-Security max-age=31536000; includeSubDomains; preload; + } ''; locations."/system/".alias = "/var/lib/mastodon/public-system/";