We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 089ca52 + d2e7e26 commit 00d9765Copy full SHA for 00d9765
1 file changed
src/lib/stores/sdk.ts
@@ -54,7 +54,10 @@ export function getApiEndpoint(region?: string): string {
54
const hostname = url.host; // "hostname:port" (or just "hostname" if no port)
55
56
// If instance supports multi-region, add the region subdomain.
57
- const subdomain = isMultiRegionSupported(url) ? getSubdomain(region) : '';
+ let subdomain = isMultiRegionSupported(url) ? getSubdomain(region) : '';
58
+ if (subdomain && hostname.startsWith(subdomain)) {
59
+ subdomain = '';
60
+ }
61
62
return `${protocol}//${subdomain}${hostname}/v1`;
63
}
0 commit comments