Update basic auth realm

This commit is contained in:
Melon 2024-05-12 23:19:00 +01:00
parent d3515a86a0
commit e6eaaedb44
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -58,7 +58,7 @@ type Auth struct {
func (a *Auth) Middleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("Authorization") == "" {
w.Header().Add("WWW-Authenticate", `Basic realm="Please provide a password", charset="UTF-8"`)
w.Header().Add("WWW-Authenticate", `Basic realm="1f349/cardcaldav", charset="UTF-8"`)
http.Error(w, "HTTP auth is required", http.StatusUnauthorized)
return
}