Add enableClientWellKnownLookups

Gate client well-known lookups on enableClientWellKnownLookups

New URL param (default on), threaded from the embedder. When off, always
avoid client .well-known: skip the post-login poll (widget + SPA) and the
legacy MatrixRTC foci fallback. When on/unset, respect the transports
endpoint response: only fall back to .well-known on a 404 M_UNRECOGNIZED.
This commit is contained in:
David Langley
2026-07-10 18:49:10 +01:00
parent 59999b9b37
commit 23a9e0c85e
6 changed files with 212 additions and 74 deletions

View File

@@ -187,6 +187,13 @@ export interface UrlConfiguration {
*/
allowIceFallback: boolean;
/**
* Whether the app may make client `.well-known` lookups against the user's
* homeserver `server_name` (the post-login well-known poll and the legacy
* MatrixRTC foci `.well-known` fallback). Defaults to true.
*/
enableClientWellKnownLookups: boolean;
/**
* Whether the app should use per participant keys for E2EE.
*/
@@ -371,6 +378,7 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
showControls: true,
hideScreensharing: false,
allowIceFallback: true,
enableClientWellKnownLookups: true,
perParticipantE2EE: true,
controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: true,
@@ -426,6 +434,7 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
showControls: true,
hideScreensharing: false,
allowIceFallback: false,
enableClientWellKnownLookups: true,
perParticipantE2EE: false,
controlledAudioDevices: false,
skipLobby: false,
@@ -472,6 +481,7 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
showControls: parser.getFlag("showControls"),
hideScreensharing: parser.getFlag("hideScreensharing"),
allowIceFallback: parser.getFlag("allowIceFallback"),
enableClientWellKnownLookups: parser.getFlag("enableClientWellKnownLookups"),
perParticipantE2EE: parser.getFlag("perParticipantE2EE"),
controlledAudioDevices: parser.getFlag("controlledAudioDevices"),
skipLobby: isWidget ? parser.getFlag("skipLobby") : false,