lib/api: Add /rest/noauth/health health-check (fixes #8430) (#8585)

This commit is contained in:
Eric P
2022-10-06 21:28:49 +02:00
committed by GitHub
parent c791dba392
commit 7a402409f1
3 changed files with 18 additions and 0 deletions
+6
View File
@@ -44,6 +44,12 @@ func basicAuthAndSessionMiddleware(cookieName string, guiCfg config.GUIConfigura
return
}
// Exception for REST calls that don't require authentication.
if strings.HasPrefix(r.URL.Path, "/rest/noauth") {
next.ServeHTTP(w, r)
return
}
cookie, err := r.Cookie(cookieName)
if err == nil && cookie != nil {
sessionsMut.Lock()