Merge branch 'main' into Xe/valkey-2

This commit is contained in:
Xe Iaso
2025-06-11 17:08:40 -04:00
committed by GitHub
16 changed files with 172 additions and 18 deletions
+4 -1
View File
@@ -71,6 +71,9 @@ func LoadPoliciesOrDefault(fname string, defaultDifficulty int) (*policy.ParsedC
}(fin)
anubisPolicy, err := policy.ParseConfig(fin, fname, defaultDifficulty)
if err != nil {
return nil, fmt.Errorf("can't parse policy file %s: %w", fname, err)
}
var validationErrs []error
for _, b := range anubisPolicy.Bots {
@@ -175,7 +178,7 @@ func New(opts Options) (*Server, error) {
// make-challenge is only used in tests. Only enable while version is devel
registerWithPrefix(anubis.APIPrefix+"make-challenge", http.HandlerFunc(result.MakeChallenge), "POST")
}
for _, implKind := range challenge.Methods() {
impl, _ := challenge.Get(implKind)
impl.Setup(mux)