diff options
Diffstat (limited to 'hosts/arrakis')
-rw-r--r-- | hosts/arrakis/services.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/hosts/arrakis/services.nix b/hosts/arrakis/services.nix index 302211b..3678f63 100644 --- a/hosts/arrakis/services.nix +++ b/hosts/arrakis/services.nix @@ -133,6 +133,16 @@ ::1 1; 192.168.1.0/24 1; } + + map $scheme $req_ssl { + default 1; + http 0 ; + } + + map "$geo$req_ssl" $enable_ssl { + default 1; + 00 1; + } ''; enable = true; @@ -151,16 +161,6 @@ enableACME = true; extraConfig = '' - set $enable_ssl 0; - - if ($geo != 1) { - set $enable_ssl 1; - } - - if ($scheme != https) { - set $enable_ssl 1; - } - if ($enable_ssl) { return 301 https://$host$request_uri; } |