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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user