From b310d94ba28433115bec92440e597e2234231e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 23 May 2025 23:18:52 +0200 Subject: [PATCH] fix-self-hosted-ports --- src/lib/stores/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/stores/sdk.ts b/src/lib/stores/sdk.ts index 9b46263cf..00acfef72 100644 --- a/src/lib/stores/sdk.ts +++ b/src/lib/stores/sdk.ts @@ -43,7 +43,7 @@ export function getApiEndpoint(region?: string): string { VARS.APPWRITE_ENDPOINT ? VARS.APPWRITE_ENDPOINT : globalThis?.location?.toString() ); const protocol = url.protocol; - const hostname = url.hostname; + const hostname = url.host; // "hostname:port" (or just "hostname" if no port) // If instance supports multi-region, add the region subdomain. const subdomain = isMultiRegionSupported(url) ? getSubdomain(region) : '';