|
|
@@ -125,6 +125,7 @@ var (
|
|
|
AuthProxyAutoSignUp bool
|
|
|
AuthProxyLdapSyncTtl int
|
|
|
AuthProxyWhitelist string
|
|
|
+ AuthProxyHeaders map[string]string
|
|
|
|
|
|
// Basic Auth
|
|
|
BasicAuthEnabled bool
|
|
|
@@ -611,6 +612,14 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
|
|
AuthProxyLdapSyncTtl = authProxy.Key("ldap_sync_ttl").MustInt()
|
|
|
AuthProxyWhitelist = authProxy.Key("whitelist").String()
|
|
|
|
|
|
+ AuthProxyHeaders = make(map[string]string)
|
|
|
+ for _, propertyAndHeader := range util.SplitString(authProxy.Key("headers").String()) {
|
|
|
+ split := strings.SplitN(propertyAndHeader, ":", 2)
|
|
|
+ if len(split) == 2 {
|
|
|
+ AuthProxyHeaders[split[0]] = split[1]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// basic auth
|
|
|
authBasic := iniFile.Section("auth.basic")
|
|
|
BasicAuthEnabled = authBasic.Key("enabled").MustBool(true)
|