1
0
Fork 0

sail: Try setting STS headers for SSL only

This commit is contained in:
Daniel Kempkens 2023-03-06 23:30:04 +01:00
parent e6cebb3932
commit 646c96fb6b
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -117,7 +117,10 @@ in
extraConfig = '' extraConfig = ''
add_header Access-Control-Allow-Origin https://mastodon.kempkens.io; add_header Access-Control-Allow-Origin https://mastodon.kempkens.io;
add_header Strict-Transport-Security max-age=31536000; includeSubDomains; preload;
if ($ssl_protocol != "") {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
}
''; '';
locations."/system/".alias = "/var/lib/mastodon/public-system/"; locations."/system/".alias = "/var/lib/mastodon/public-system/";