1 Commits
Author SHA1 Message Date
73361a635e Disable request blocking when CrowdSec is unavailable in live mode. (#373)
* Disable request blocking when CrowdSec is unavailable in live mode.

* 📝 document the live-mode behaviour and cover it with tests

The README said UpdateMaxFailure is "used only in stream and alone mode",
which this branch makes untrue, so the feature was undiscoverable from the
docs. It now also records that -1 is the only value with any effect in live
and none mode, since that path has no failure counter.

Test_handleNoStreamCache had a TODO and no cases, so this path had no
coverage in either direction. Adds four: live blocks at the default and at
any positive value, live lets the request through at -1, and none does the
same. The last two fail without the three-line change in this branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: mhx <mathieu@hanotaux.fr>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 09:27:24 +02:00