diff --git a/packages/pds/src/config/config.ts b/packages/pds/src/config/config.ts index 7f24c9ebced..b3fef9e47fc 100644 --- a/packages/pds/src/config/config.ts +++ b/packages/pds/src/config/config.ts @@ -90,6 +90,7 @@ export const envToCfg = (env: ServerEnvironment): ServerConfig => { resolverTimeout: env.resolverTimeout ?? 3 * SECOND, recoveryDidKey: env.recoveryDidKey ?? null, serviceHandleDomains, + handleBackupNameservers: env.handleBackupNameservers, } // default to being required if left undefined @@ -246,6 +247,7 @@ export type IdentityConfig = { cacheMaxTTL: number recoveryDidKey: string | null serviceHandleDomains: string[] + handleBackupNameservers?: string[] } export type InvitesConfig = diff --git a/packages/pds/src/config/env.ts b/packages/pds/src/config/env.ts index 8dde8710e32..170e26d5976 100644 --- a/packages/pds/src/config/env.ts +++ b/packages/pds/src/config/env.ts @@ -35,6 +35,7 @@ export const readEnv = (): ServerEnvironment => { resolverTimeout: envInt('PDS_ID_RESOLVER_TIMEOUT'), recoveryDidKey: envStr('PDS_RECOVERY_DID_KEY'), serviceHandleDomains: envList('PDS_SERVICE_HANDLE_DOMAINS'), + handleBackupNameservers: envList('PDS_HANDLE_BACKUP_NAMESERVERS'), // invites inviteRequired: envBool('PDS_INVITE_REQUIRED'), @@ -123,6 +124,7 @@ export type ServerEnvironment = { resolverTimeout?: number recoveryDidKey?: string serviceHandleDomains?: string[] // public hostname by default + handleBackupNameservers?: string[] // invites inviteRequired?: boolean diff --git a/packages/pds/src/context.ts b/packages/pds/src/context.ts index 466bc9a5613..328b61893a1 100644 --- a/packages/pds/src/context.ts +++ b/packages/pds/src/context.ts @@ -133,6 +133,7 @@ export class AppContext { plcUrl: cfg.identity.plcUrl, didCache, timeout: cfg.identity.resolverTimeout, + backupNameservers: cfg.identity.handleBackupNameservers, }) const plcClient = new plc.Client(cfg.identity.plcUrl)