Merge pull request #1883 from appwrite/fix-self-hosted-ports

Fix: Self-hosted ports
This commit is contained in:
Matej Bačo
2025-05-23 23:25:28 +02:00
committed by GitHub
+1 -1
View File
@@ -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) : '';