mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 01:38:14 -04:00

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>
15 lines
276 B
Go
15 lines
276 B
Go
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)
|
|
})
|
|
}
|