diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/private/websites/immae/production.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/private/websites/immae/production.nix b/modules/private/websites/immae/production.nix index 87bb848..3d76b86 100644 --- a/modules/private/websites/immae/production.nix +++ b/modules/private/websites/immae/production.nix | |||
@@ -14,12 +14,25 @@ in { | |||
14 | services.websites.env.production.vhostConfs.immae = { | 14 | services.websites.env.production.vhostConfs.immae = { |
15 | certName = "eldiron"; | 15 | certName = "eldiron"; |
16 | addToCerts = true; | 16 | addToCerts = true; |
17 | hosts = [ "www.immae.eu" ]; | 17 | hosts = [ "www.immae.eu" "immae.eu" ]; |
18 | root = varDir; | 18 | root = varDir; |
19 | extraConfig = [ | 19 | extraConfig = [ |
20 | '' | 20 | '' |
21 | Use Stats www.immae.eu | 21 | Use Stats www.immae.eu |
22 | 22 | ||
23 | <LocationMatch /.well-known/(webfinger|host-meta)> | ||
24 | Header always set Referrer-Policy "strict-origin-when-cross-origin" | ||
25 | Header always set Strict-Transport-Security "max-age=31536000" | ||
26 | RequestHeader set X-Forwarded-Proto "https" | ||
27 | |||
28 | RewriteRule ^(.*)$ https://mastodon.immae.eu%{REQUEST_URI} [QSA,L] | ||
29 | </LocationMatch> | ||
30 | |||
31 | RewriteEngine On | ||
32 | RewriteCond "%{REQUEST_URI}" "!^/.well-known/(webfinger|host-meta)" | ||
33 | RewriteCond "%{HTTP_HOST}" "!^www\.immae\.eu$" [NC] | ||
34 | RewriteRule ^(.+)$ https://www.immae.eu$1 [R=302,L] | ||
35 | |||
23 | <Directory ${varDir}> | 36 | <Directory ${varDir}> |
24 | DirectoryIndex index.htm index.html | 37 | DirectoryIndex index.htm index.html |
25 | Options Indexes FollowSymLinks MultiViews Includes | 38 | Options Indexes FollowSymLinks MultiViews Includes |