Skip to content

Commit

Permalink
Merge pull request prometheus#6 from kesselborn/basic-auth-fix
Browse files Browse the repository at this point in the history
Tell clients to authenticate with basic auth
  • Loading branch information
matttproud committed Jan 9, 2013
2 parents 872a959 + 0f7fe64 commit e9b12f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func (register *Registry) YieldBasicAuthExporter(username, password string) http
if authenticated {
exporter.ServeHTTP(w, r)
} else {
http.Error(w, "access forbidden", 403)
w.Header().Add("WWW-Authenticate", "Basic")
http.Error(w, "access forbidden", 401)
}
})
}
Expand Down

0 comments on commit e9b12f3

Please sign in to comment.