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
+4
View File
@@ -51,6 +51,10 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
"enableUserEditing": conf.Server.EnableUserEditing,
"devEnableShare": conf.Server.DevEnableShare,
}
auth := handleLoginFromHeaders(ds, r)
if auth != nil {
appConfig["auth"] = *auth
}
j, err := json.Marshal(appConfig)
if err != nil {
log.Error(r, "Error converting config to JSON", "config", appConfig, err)