Reverse proxy authentication support (#1152)

* feat(auth): reverse proxy authentication support - #176

* address PR remarks

* Fix redaction of UI appConfig

Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Igor Rzegocki
2021-06-12 03:17:21 +00:00
committed by GitHub
parent b445cdd641
commit 6bd4c0f6bf
8 changed files with 216 additions and 3 deletions
+5
View File
@@ -4,6 +4,7 @@ package log
// Copyright (c) 2018 William Huang
import (
"fmt"
"reflect"
"regexp"
@@ -47,6 +48,10 @@ func (h *Hook) Fire(e *logrus.Entry) error {
case reflect.String:
e.Data[k] = re.ReplaceAllString(v.(string), "$1[REDACTED]$2")
continue
case reflect.Map:
s := fmt.Sprintf("%+v", v)
e.Data[k] = re.ReplaceAllString(s, "$1[REDACTED]$2")
continue
}
}