mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-09-02 20:28:50 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
022747488c | ||
|
|
0ed8154340 |
+6
-1
@@ -641,7 +641,12 @@ func handleStreamCache(bouncer *Bouncer) error {
|
||||
if err.Error() != cache.CacheMiss {
|
||||
return err
|
||||
}
|
||||
bouncer.cacheClient.Set(cacheTimeoutKey, cache.NoBannedValue, bouncer.updateInterval-1)
|
||||
// To avoid every instance trying to update the cache, set 1 second at least
|
||||
leaseDuration := bouncer.updateInterval - 1
|
||||
if leaseDuration < 1 {
|
||||
leaseDuration = 1
|
||||
}
|
||||
bouncer.cacheClient.Set(cacheTimeoutKey, cache.NoBannedValue, leaseDuration)
|
||||
streamRouteURL := url.URL{
|
||||
Scheme: bouncer.crowdsecScheme,
|
||||
Host: bouncer.crowdsecHost,
|
||||
|
||||
Reference in New Issue
Block a user