mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
refactored proxuauthstrategy and added some env variables
This commit is contained in:
parent
4875125ae9
commit
96c5a51eac
5 changed files with 103 additions and 126 deletions
|
|
@ -158,6 +158,14 @@ class ServerSettings {
|
|||
this.authActiveAuthMethods = ['local']
|
||||
}
|
||||
|
||||
// Environment variable to enable proxy authentication (only during initialization)
|
||||
if (process.env.AUTH_PROXY_ENABLED === 'true' || process.env.AUTH_PROXY_ENABLED === '1') {
|
||||
if (!this.authActiveAuthMethods.includes('proxy')) {
|
||||
Logger.info(`[ServerSettings] Enabling proxy authentication from environment variable AUTH_PROXY_ENABLED`)
|
||||
this.authActiveAuthMethods.push('proxy')
|
||||
}
|
||||
}
|
||||
|
||||
// remove uninitialized methods
|
||||
// OpenID
|
||||
if (this.authActiveAuthMethods.includes('openid') && !this.isOpenIDAuthSettingsValid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue