Skip to content

Commit

Permalink
linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Feb 15, 2021
1 parent b71f31e commit ed7e2ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simplehttpserver.go
Expand Up @@ -63,8 +63,8 @@ func basicauthlayer(handler http.Handler) http.HandlerFunc {
user, pass, ok := r.BasicAuth()
if !ok || user != opts.Username || pass != opts.Password {
w.Header().Set("WWW-Authenticate", fmt.Sprintf("Basic realm=\"%s\"", opts.Realm))
w.WriteHeader(401)
w.Write([]byte("Unauthorized.\n"))
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorized.\n")) //nolint
return
}
handler.ServeHTTP(w, r)
Expand Down

0 comments on commit ed7e2ee

Please sign in to comment.