Skip to content

Commit d6277e3

Browse files
committed
修 脑抽bug
1 parent f36fd35 commit d6277e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func HelloHandler(w http.ResponseWriter, r *http.Request) {
103103
w.WriteHeader(http.StatusUnauthorized)
104104
return
105105
}
106-
if u != dnslogserver.Basicauth.Username && p != dnslogserver.Basicauth.Password {
106+
if u != dnslogserver.Basicauth.Username || p != dnslogserver.Basicauth.Password {
107107
log.Println("Basic auth Failed", u)
108108
w.Header().Set("WWW-Authenticate", `Basic realm="My REALM"`)
109109
w.WriteHeader(http.StatusUnauthorized)

0 commit comments

Comments
 (0)