Watch
0
0
Fork
You've already forked hyperhive
0

serve matrix discovery at the swarm apex, keep the pinned hive case

This commit is contained in:
atlas 2026-10-25 11:13:22 +01:00 • committed by mara
commit 2e7d49bb88
10 changed files with 187 additions and 83 deletions

View file

@ -662,9 +662,15 @@ let
];
}
{
name = "a hive with matrix off serves no matrix discovery endpoint";
# The hive domain answers discovery only for a server name pinned to it,
# which `bare` does not do. Its vhost exists (the redirect is there), so
# the absence arms cannot pass on a misspelled name.
name = "an unpinned hive serves no matrix discovery on its domain";
ok =
!(builtins.hasAttr "= /.well-known/matrix/client" bare.services.nginx.virtualHosts."_".locations);
let
l = bare.services.nginx.virtualHosts."h1.t.local".locations;
in
l ? "/" && !(l ? "= /.well-known/matrix/client") && !(l ? "= /.well-known/matrix/server");
}
{
# main got eval-borked twice by this exact class of bug (once on the