mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 19:48:59 +02:00
✨ add redis timeout
This commit is contained in:
Vendored
+2
-2
@@ -27,7 +27,7 @@ func getDecisionLocalCache(clientIP string) (bool, error) {
|
||||
if isCached && isValid && len(bannedString) > 0 {
|
||||
return bannedString == cacheBannedValue, nil
|
||||
}
|
||||
return false, fmt.Errorf("no cache data")
|
||||
return false, fmt.Errorf("cache:miss")
|
||||
}
|
||||
|
||||
func setDecisionLocalCache(clientIP string, value string, duration int64) {
|
||||
@@ -46,7 +46,7 @@ func getDecisionRedisCache(clientIP string) (bool, error) {
|
||||
if err == nil && len(bannedString) > 0 {
|
||||
return bannedString == cacheBannedValue, nil
|
||||
}
|
||||
return false, fmt.Errorf("no cache data")
|
||||
return false, err
|
||||
}
|
||||
|
||||
func setDecisionRedisCache(clientIP string, value string, duration int64) {
|
||||
|
||||
Reference in New Issue
Block a user