Skip to content

Commit

Permalink
修 脑抽bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yumusb committed Dec 14, 2021
1 parent f36fd35 commit d6277e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func HelloHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusUnauthorized)
return
}
if u != dnslogserver.Basicauth.Username && p != dnslogserver.Basicauth.Password {
if u != dnslogserver.Basicauth.Username || p != dnslogserver.Basicauth.Password {
log.Println("Basic auth Failed", u)
w.Header().Set("WWW-Authenticate", `Basic realm="My REALM"`)
w.WriteHeader(http.StatusUnauthorized)
Expand Down

0 comments on commit d6277e3

Please sign in to comment.