use correct realm
This commit is contained in:
@@ -106,7 +106,7 @@ func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
password := config.Get("HTTP_PASS")
|
password := config.Get("HTTP_PASS")
|
||||||
|
|
||||||
if !ok || subtle.ConstantTimeCompare([]byte(user), []byte(username)) != 1 || subtle.ConstantTimeCompare([]byte(pass), []byte(password)) != 1 {
|
if !ok || subtle.ConstantTimeCompare([]byte(user), []byte(username)) != 1 || subtle.ConstantTimeCompare([]byte(pass), []byte(password)) != 1 {
|
||||||
w.Header().Set("WWW-Authenticate", `Basic realm="quicknote"`)
|
w.Header().Set("WWW-Authenticate", `Basic realm="kls"`)
|
||||||
w.WriteHeader(401)
|
w.WriteHeader(401)
|
||||||
w.Write([]byte("Unauthorised.\n"))
|
w.Write([]byte("Unauthorised.\n"))
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user