fix: remove application fingerprints from public responses

This commit is contained in:
ji ruo committed 2026-11-03 14:48:41 +08:00
1 parent c0b558fa1e
commit 5203176364
9 files changed
+195 -20

No files matched your search

+1 -1
View File
@@ -140,7 +140,7 @@ func (s *Server) requireBasicAuth(next http.Handler) http.Handler {
username, password, ok := r.BasicAuth()
if !ok || len(password) > maxPasswordBytes || username != cfg.Username ||
bcrypt.CompareHashAndPassword([]byte(cfg.PasswordHash), []byte(password)) != nil {
w.Header().Set("WWW-Authenticate", `Basic realm="ARTEX", charset="UTF-8"`)
w.Header().Set("WWW-Authenticate", `Basic realm="Restricted", charset="UTF-8"`)
writeErr(w, http.StatusUnauthorized, "请先完成 HTTP Basic Auth 验证")
return
}