Import Anubis v1.28.2

Replace the tree with upstream TecharoHQ/anubis v1.28.2 (a1384fbf42e3).
Masyunis customizations are re-applied in the following commits.
This commit is contained in:
sol_bot Bot committed 2026-11-28 14:52:26 +03:00
1 parent eb3e46d8d0
commit e07de898cd
573 files changed
+35846 -6807

No files matched your search

+7 -1
View File
@@ -6,9 +6,15 @@ import (
"github.com/lum8rjack/go-ja4h"
)
// JA4HHeaderName is the name of the HTTP header that the [JA4H] middleware adds
// to requests, holding the request's JA4H fingerprint. It is also used to
// detect whether a policy references the fingerprint, so that the relatively
// expensive computation can be skipped when no rule needs it.
const JA4HHeaderName = "X-Http-Fingerprint-Ja4h"
func JA4H(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
r.Header.Add("X-Http-Fingerprint-JA4H", ja4h.JA4H(r))
r.Header.Set(JA4HHeaderName, ja4h.JA4H(r))
next.ServeHTTP(w, r)
})
}