Watch
0
0
Fork
You've already forked hyperhive
0

hive-matrix: prefill the chat client with the server name, not the hive domain

This commit is contained in:
damocles 2026-11-10 21:45:49 +01:00 • committed by mara
commit 1cc1cb804d

View file

@ -9,10 +9,6 @@ let
networkCfg = config.services.hyperhive.network;
tlsCfg = config.services.hyperhive.deploy.hive-controller.tls;
gatewayCfg = config.services.hyperhive.gateway;
# The hive's own domain; null on a homeserver host that runs no hive, where
# the client is pointed at the server name instead.
hyperhiveDomain = config.services.hyperhive.domain;
rootfsCheck = import ./lib/container-rootfs-check.nix { inherit config; };
# Same runtime→build-time bridge hive-forge and swarm-ci-runner cross:
@ -554,14 +550,13 @@ in
};
# FluffyChat boot-config pre-fill so the client's
# `.well-known/matrix/client` lookup hits the right delegation
# endpoint. A hive host names its hive domain; a homeserver host
# without a hive has none and names the server name.
# endpoint. That lookup reads the server name, which the swarm apex
# (or the hive vhost a pinned server name equals) answers for, not
# the hive domain.
"= /config.json" = {
extraConfig = ''
default_type application/json;
return 200 '{"defaultHomeserver":"${
if hyperhiveDomain != null then hyperhiveDomain else effectiveServerName
}"}';
return 200 '{"defaultHomeserver":"${effectiveServerName}"}';
'';
};
};