diff --git a/src/models/AppDefinition.ts b/src/models/AppDefinition.ts index a59bf1a..3d693b2 100644 --- a/src/models/AppDefinition.ts +++ b/src/models/AppDefinition.ts @@ -54,7 +54,6 @@ interface IAppDefinitionBase { hasPersistentData: boolean hasDefaultSubDomainSsl: boolean containerHttpPort?: number - httpBasicAuth?: string captainDefinitionRelativeFilePath: string forceSsl: boolean nodeId?: string @@ -76,6 +75,11 @@ interface IAppDef extends IAppDefinitionBase { repoInfo: RepoInfo pushWebhookToken: string } + httpAuth?: { + user: string + password?: string + passwordHashed?: string + } appName?: string isAppBuilding?: boolean } @@ -88,4 +92,9 @@ interface IAppDefSaved extends IAppDefinitionBase { pushWebhookToken: string } | undefined + + httpAuth?: { + user: string + passwordHashed?: string + } } diff --git a/src/user/system/LoadBalancerManager.ts b/src/user/system/LoadBalancerManager.ts index 7defa68..731e34a 100644 --- a/src/user/system/LoadBalancerManager.ts +++ b/src/user/system/LoadBalancerManager.ts @@ -227,7 +227,12 @@ class LoadBalancerManager { .then(function(apps) { Object.keys(apps).forEach(function(appName) { const webApp = apps[appName] - const httpBasicAuth = webApp.httpBasicAuth || '' + const httpBasicAuth = + webApp.httpAuth && webApp.httpAuth.passwordHashed // + ? webApp.httpAuth.user + + ':' + + webApp.httpAuth.passwordHashed + : '' if (webApp.notExposeAsWebApp) { return