From bf392a6566e817dcf1f5407c34b47b0edd3a5651 Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Wed, 16 Sep 2026 09:24:17 +0200 Subject: [PATCH] fix(auth): allow connecting to plaintext http homeservers --- src-tauri/capabilities/default.json | 6 +++++- src/app/hooks/useIntegrationManager.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 9307034c80..75f648a1c7 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -30,7 +30,7 @@ "clipboard-manager:allow-write-image", { "identifier": "http:default", - "allow": [{ "url": "https://*:*" }] + "allow": [{ "url": "https://*:*" }, { "url": "http://*:*" }] }, { "identifier": "opener:allow-open-url", @@ -38,6 +38,10 @@ { "url": "https://*", "app": "inAppBrowser" + }, + { + "url": "http://*", + "app": "inAppBrowser" } ] } diff --git a/src/app/hooks/useIntegrationManager.ts b/src/app/hooks/useIntegrationManager.ts index 3b6710ccd0..c5248b43e0 100644 --- a/src/app/hooks/useIntegrationManager.ts +++ b/src/app/hooks/useIntegrationManager.ts @@ -21,7 +21,7 @@ async function discoverManagers(mx: MatrixClient): Promise try { const baseUrl = mx.getHomeserverUrl(); const url = new URL(baseUrl); - const wellKnownUrl = `https://${url.hostname}/.well-known/matrix/client`; + const wellKnownUrl = `${url.origin}/.well-known/matrix/client`; const resp = await fetch(wellKnownUrl, { method: 'GET' }); if (resp.ok) {