use correct realm

This commit is contained in:
Kyle Isom 2023-09-12 22:37:37 -07:00
parent 552e1e3ac1
commit 25e38814a2
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
password := config.Get("HTTP_PASS")
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.Write([]byte("Unauthorised.\n"))
return