Add grace period to reach LAPI without blocking further queries (#153)

*  Add grace period to reach LAPI without blocking further queries

* 🐛 Fix config validation for maxFailedStreamUpdate

* 🚨 Fix some lint issue

* 🚨 Bypass lint complexity on ServeHTTP

* 🍱 fix and improve

* 🚨 Fix lint

* 🚨 Fix lint

* 🐛 Fix logic for update max failure

* 📝 Update doc and docker compose local reset

* 🍱 fix log nightmare

* 🍱 fix

---------

Co-authored-by: max.lerebourg <max.lerebourg@monisnap.com>
This commit is contained in:
mathieuHa
2024-05-01 18:07:44 +02:00
committed by GitHub
co-authored by max.lerebourg
parent b6a0404efd
commit ee97250acf
3 changed files with 22 additions and 5 deletions
+5
View File
@@ -396,6 +396,10 @@ Only one instance of the plugin is *possible*.
- int64
- default: 60
- Used only in `stream` mode, the interval between requests to fetch blacklisted IPs from LAPI
- UpdateMaxFailure
- int64
- default: 0
- Used only in `stream` and `alone` mode, the maximum number of time we can not reach Crowdsec before blocking traffic (set -1 to never block)
- DefaultDecisionSeconds
- int64
- default: 60
@@ -475,6 +479,7 @@ http:
enabled: false
logLevel: DEBUG
updateIntervalSeconds: 60
updateMaxFailure: 0
defaultDecisionSeconds: 60
httpTimeoutSeconds: 10
crowdsecMode: live