Kaynağa Gözat

fix basic auth (#564)

* fix basic auth

* better logic
Andrea Spacca 2 yıl önce
ebeveyn
işleme
45e2654036
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      server/handlers.go

+ 1 - 1
server/handlers.go

@@ -1326,7 +1326,7 @@ func ipFilterHandler(h http.Handler, ipFilterOptions *IPFilterOptions) http.Hand
 
 func (s *Server) basicAuthHandler(h http.Handler) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
-		if s.authUser == "" || s.authPass == "" || s.authHtpasswd == "" {
+		if s.authUser == "" && s.authPass == "" && s.authHtpasswd == "" {
 			h.ServeHTTP(w, r)
 			return
 		}