Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions lib/anubis.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,3 +672,25 @@ func (s *Server) check(r *http.Request, lg *slog.Logger) (policy.CheckResult, *p
Rules: &checker.List{},
}, nil
}

// ADDED FOR PUBLIC USE

func AddCustomRealIPHeader(customRealIPHeaderValue string, next http.Handler) http.Handler {
return internal.CustomRealIPHeader(customRealIPHeaderValue, next)
}

func AddRemoteXRealIP(useRemoteAddress bool, bindNetwork string, next http.Handler) http.Handler {
return internal.RemoteXRealIP(useRemoteAddress, bindNetwork, next)
}

func AddXForwardedForToXRealIP(next http.Handler) http.Handler {
return internal.XForwardedForToXRealIP(next)
}

func AddXForwardedForUpdate(stripPrivate bool, next http.Handler) http.Handler {
return internal.XForwardedForUpdate(stripPrivate, next)
}

func AddJA4H(next http.Handler) http.Handler {
return internal.JA4H(next)
}