fix: remove legacy platform env fallbacks

This commit is contained in:
2026-04-28 12:44:01 +00:00
parent f0b924ba9d
commit df542ec67a
5 changed files with 13 additions and 11 deletions
+3 -5
View File
@@ -105,9 +105,8 @@ export class SzPlatformClient {
const connectionAddress =
this.connectionAddress ||
(await this.getConfiguredEnvVar('SERVEZONE_PLATFORM_URL')) ||
this.getConnectionAddressFromBindings() ||
(await this.getConfiguredEnvVar('SERVEZONE_API_DOMAIN'));
if (!connectionAddress) throw new Error('SERVEZONE_PLATFORM_URL or SERVEZONE_API_DOMAIN is required');
this.getConnectionAddressFromBindings();
if (!connectionAddress) throw new Error('SERVEZONE_PLATFORM_URL or platform binding endpoint is required');
return connectionAddress;
}
@@ -138,8 +137,7 @@ export class SzPlatformClient {
private async getConfiguredAuthorizationString() {
return (
(await this.getConfiguredEnvVar('SERVEZONE_PLATFORM_AUTHORIZATION')) ||
(await this.getConfiguredEnvVar('SERVEZONE_PLATFORM_TOKEN')) ||
(await this.getConfiguredEnvVar('SERVEZONE_PLATFROM_AUTHORIZATION'))
(await this.getConfiguredEnvVar('SERVEZONE_PLATFORM_TOKEN'))
);
}