summary refs log tree commit diff
path: root/fleet/hosts/trieste
diff options
context:
space:
mode:
authorV <v@unfathomable.blue>2022-06-06 12:45:46 +0200
committerV <v@unfathomable.blue>2022-06-06 13:11:29 +0200
commite1ec1dfd6aa4f88377dafcd18c5ecc728e2dc74a (patch)
treeee558ab43ec842983f1ca7c94b0f848a2088c7bb /fleet/hosts/trieste
parenta96992b3e1e9e8d1a877b02ddf1b475d04aad32a (diff)
downloadunf-legacy-e1ec1dfd6aa4f88377dafcd18c5ecc728e2dc74a.tar.zst
fleet/hosts/trieste/web: fix homepage 404ing
Unless Caddy recently changed how it resolves directives, this has been
broken since the initial deployment. `error` directives are processed
before `respond` directives[1], and unlike CSS, matcher precision does
not impact directive precedence. Sticking a `route` directive around the
two of them makes things work as expected.

[1]: https://caddyserver.com/docs/caddyfile/directives#directive-order

Change-Id: Ic05c6ba9a7143c3a58c2bf7ccd0498a7337257f8
Diffstat (limited to 'fleet/hosts/trieste')
-rw-r--r--fleet/hosts/trieste/web.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/fleet/hosts/trieste/web.nix b/fleet/hosts/trieste/web.nix
index 9b7752b..63d59d8 100644
--- a/fleet/hosts/trieste/web.nix
+++ b/fleet/hosts/trieste/web.nix
@@ -19,8 +19,10 @@
   services.caddy.extraConfig = ''
     unfathomable.blue {
       import common
-      respond / "the depths await"
-      error 404
+      route {
+        respond / "the depths await"
+        error 404
+      }
     }
 
     ripple.unfathomable.blue {