mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-14 06:13:49 +08:00
fix: remove application fingerprints from public responses
This commit is contained in:
1 parent
c0b558fa1e
commit
5203176364
9 files changed
+195
-20
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user