summary refs log tree commit diff stats
path: root/system/services/etebase/default.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/services/etebase/default.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/system/services/etebase/default.nix b/system/services/etebase/default.nix
index 964ea59..e8a3d81 100644
--- a/system/services/etebase/default.nix
+++ b/system/services/etebase/default.nix
@@ -4,7 +4,10 @@
     port = 8001;
     settings = {
       global.secret_file = "${config.age.secrets.etebase-server.path}";
-      allowed_hosts.allowed_host1 = "127.0.0.1";
+      allowed_hosts = {
+        allowed_host1 = "etebase.vhack.eu";
+        allowed_host2 = "dav.vhack.eu";
+      };
     };
   };
 
@@ -20,14 +23,13 @@
         enableACME = true;
         forceSSL = true;
 
-        locations."/" = {
-          proxyPass = "http://127.0.0.1:${builtins.toString config.services.etebase-server.port}";
-          extraConfig = ''
-            proxy_set_header Host $host;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-            proxy_set_header X-Forwarded-Host $server_name;
-          '';
+        locations = {
+          "/static" = {
+            root = config.services.etebase-server.settings.global.media_root;
+          };
+          "/" = {
+            proxyPass = "http://127.0.0.1:${builtins.toString config.services.etebase-server.port}";
+          };
         };
         serverAliases = [
           "dav.vhack.eu"