mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
Exclude /metrics path from private repos check (#69)
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
This commit is contained in:
parent
420b1d3ee8
commit
6f412e6a8a
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ func (s Server) AuthHandler(f *HtpasswdFile, h http.Handler) http.HandlerFunc {
|
|||
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
if s.PrivateRepos && !isUserPath(username, r.URL.Path) {
|
||||
if s.PrivateRepos && !isUserPath(username, r.URL.Path) && r.URL.Path != "/metrics" {
|
||||
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue