aboutsummaryrefslogtreecommitdiff
path: root/lib/anubis.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-03-23 10:30:55 -0400
committerXe Iaso <me@xeiaso.net>2025-03-23 18:29:06 -0400
commita3ede62bbd3b4b8c981df45797d4b899fbf7e8c1 (patch)
tree1b85f32537e501e6e0ff7f1a2fb6e1add71eb0ea /lib/anubis.go
parentf462209b02cbb62864f5c4ccacd5a31cca5b138e (diff)
downloadanubis-Xe/default-difficulty-fix.tar.xz
anubis-Xe/default-difficulty-fix.zip
lib: fix default difficultyXe/default-difficulty-fix
Before this did not respect the difficulty flag and instead used difficulty 4. This has been fixed. Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lib/anubis.go')
-rw-r--r--lib/anubis.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/anubis.go b/lib/anubis.go
index 5953a48..43993bb 100644
--- a/lib/anubis.go
+++ b/lib/anubis.go
@@ -498,8 +498,8 @@ func (s *Server) check(r *http.Request) (CheckResult, *policy.Bot, error) {
return cr("default/allow", config.RuleAllow), &policy.Bot{
Challenge: &config.ChallengeRules{
- Difficulty: anubis.DefaultDifficulty,
- ReportAs: anubis.DefaultDifficulty,
+ Difficulty: s.policy.DefaultDifficulty,
+ ReportAs: s.policy.DefaultDifficulty,
Algorithm: config.AlgorithmFast,
},
}, nil