hive-matrix: prefill the chat client with the server name, not the hive domain
This commit is contained in:
parent
2de07c4575
commit
1cc1cb804d
1 changed files with 21 additions and 9 deletions
|
|
@ -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}"}';
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue