+ http: allow access to /__locales/ when not authenticated

This commit is contained in:
Simon Zolin 2020-01-31 14:15:11 +03:00
parent f3b41efff3
commit 2151563757
1 changed files with 2 additions and 1 deletions

View File

@ -379,7 +379,8 @@ func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.Re
} }
} else if r.URL.Path == "/favicon.png" || } else if r.URL.Path == "/favicon.png" ||
strings.HasPrefix(r.URL.Path, "/login.") { strings.HasPrefix(r.URL.Path, "/login.") ||
strings.HasPrefix(r.URL.Path, "/__locales/") {
// process as usual // process as usual
} else if config.auth != nil && config.auth.AuthRequired() { } else if config.auth != nil && config.auth.AuthRequired() {