mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-08 04:05:23 -04:00
lib: minimize the amount and type of data collected
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
661d72474b
commit
43b8a9257a
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Minimize the amount of data logged when users pass, fail, or otherwise interact with Anubis
|
||||||
- Added a periodic cleanup routine for the decaymap that removes expired entries, ensuring stale data is properly pruned.
|
- Added a periodic cleanup routine for the decaymap that removes expired entries, ensuring stale data is properly pruned.
|
||||||
- Added a no-store Cache-Control header to the challenge page
|
- Added a no-store Cache-Control header to the challenge page
|
||||||
- Hide the directory listings for Anubis' internal static content
|
- Hide the directory listings for Anubis' internal static content
|
||||||
|
@ -174,14 +174,7 @@ func (s *Server) challengeFor(r *http.Request, difficulty int) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) MaybeReverseProxy(w http.ResponseWriter, r *http.Request) {
|
func (s *Server) MaybeReverseProxy(w http.ResponseWriter, r *http.Request) {
|
||||||
lg := slog.With(
|
lg := slog.With("user_agent", r.UserAgent())
|
||||||
"user_agent", r.UserAgent(),
|
|
||||||
"accept_language", r.Header.Get("Accept-Language"),
|
|
||||||
"priority", r.Header.Get("Priority"),
|
|
||||||
"x-forwarded-for",
|
|
||||||
r.Header.Get("X-Forwarded-For"),
|
|
||||||
"x-real-ip", r.Header.Get("X-Real-Ip"),
|
|
||||||
)
|
|
||||||
|
|
||||||
cr, rule, err := s.check(r)
|
cr, rule, err := s.check(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -344,7 +337,7 @@ func (s *Server) RenderBench(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) MakeChallenge(w http.ResponseWriter, r *http.Request) {
|
func (s *Server) MakeChallenge(w http.ResponseWriter, r *http.Request) {
|
||||||
lg := slog.With("user_agent", r.UserAgent(), "accept_language", r.Header.Get("Accept-Language"), "priority", r.Header.Get("Priority"), "x-forwarded-for", r.Header.Get("X-Forwarded-For"), "x-real-ip", r.Header.Get("X-Real-Ip"))
|
lg := slog.With("user_agent", r.UserAgent())
|
||||||
|
|
||||||
cr, rule, err := s.check(r)
|
cr, rule, err := s.check(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -372,13 +365,7 @@ func (s *Server) MakeChallenge(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request) {
|
func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request) {
|
||||||
lg := slog.With(
|
lg := slog.With("user_agent", r.UserAgent())
|
||||||
"user_agent", r.UserAgent(),
|
|
||||||
"accept_language", r.Header.Get("Accept-Language"),
|
|
||||||
"priority", r.Header.Get("Priority"),
|
|
||||||
"x-forwarded-for", r.Header.Get("X-Forwarded-For"),
|
|
||||||
"x-real-ip", r.Header.Get("X-Real-Ip"),
|
|
||||||
)
|
|
||||||
|
|
||||||
cr, rule, err := s.check(r)
|
cr, rule, err := s.check(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user