mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-09-02 20:28:50 +02:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
022747488c | ||
|
|
0ed8154340 | ||
|
|
bef5dfaadb |
+6
-1
@@ -641,7 +641,12 @@ func handleStreamCache(bouncer *Bouncer) error {
|
|||||||
if err.Error() != cache.CacheMiss {
|
if err.Error() != cache.CacheMiss {
|
||||||
return err
|
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{
|
streamRouteURL := url.URL{
|
||||||
Scheme: bouncer.crowdsecScheme,
|
Scheme: bouncer.crowdsecScheme,
|
||||||
Host: bouncer.crowdsecHost,
|
Host: bouncer.crowdsecHost,
|
||||||
|
|||||||
+1
-1
@@ -2,4 +2,4 @@ package crowdsec_bouncer_traefik_plugin //nolint:revive,stylecheck
|
|||||||
|
|
||||||
// pluginVersion is what the plugin reports to the Crowdsec LAPI.
|
// pluginVersion is what the plugin reports to the Crowdsec LAPI.
|
||||||
// Do not edit by hand: the "Release (1/2) Prepare" workflow bumps it.
|
// Do not edit by hand: the "Release (1/2) Prepare" workflow bumps it.
|
||||||
var pluginVersion = "v1.6.0" //nolint:gochecknoglobals
|
var pluginVersion = "v1.7.1" //nolint:gochecknoglobals
|
||||||
|
|||||||
Reference in New Issue
Block a user