mirror of
https://github.com/caprover/caprover
synced 2026-05-04 18:50:33 +00:00
Changed http auth saving structure
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user