feat(cmd/anubis): capture ja4h fingerprints (#834)

This is not used yet, but it will be part of a larger strategy around
adding/removing weight based on JA4H (and other) fingerprint matches
with Thoth.

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2025-07-14 23:31:33 -04:00 committed by GitHub
parent d28991ce8d
commit 132b2ed853
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 20 additions and 0 deletions

14
internal/ja4h.go Normal file
View file

@ -0,0 +1,14 @@
package internal
import (
"net/http"
"github.com/lum8rjack/go-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))
next.ServeHTTP(w, r)
})
}