From 0d8fd2a7a9076f4a2514176aa9b5aef5b657c691 Mon Sep 17 00:00:00 2001 From: maxlerebourg Date: Tue, 5 May 2026 15:51:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=B1=20Header.Add=20->=20Set,=20log=20I?= =?UTF-8?q?nfo=20->=20Debug,=20version=20bump=20(#324)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bouncer.go | 7 ++++--- version.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bouncer.go b/bouncer.go index aa5f92c..a723554 100644 --- a/bouncer.go +++ b/bouncer.go @@ -663,7 +663,7 @@ func handleStreamCache(bouncer *Bouncer) error { for _, decision := range stream.Deleted { bouncer.cacheClient.Delete(decision.Value) } - bouncer.log.Info("handleStreamCache:updated") + bouncer.log.Debug("handleStreamCache:updated") return nil } @@ -674,8 +674,8 @@ func crowdsecQuery(bouncer *Bouncer, stringURL string, data []byte) ([]byte, err } else { req, _ = http.NewRequest(http.MethodGet, stringURL, nil) } - req.Header.Add(bouncer.crowdsecHeader, bouncer.crowdsecKey) - req.Header.Add("User-Agent", "Crowdsec-Bouncer-Traefik-Plugin/"+pluginVersion) + req.Header.Set(bouncer.crowdsecHeader, bouncer.crowdsecKey) + req.Header.Set("User-Agent", "Crowdsec-Bouncer-Traefik-Plugin/"+pluginVersion) res, err := bouncer.httpClient.Do(req) if err != nil { @@ -739,6 +739,7 @@ func appsecQuery(bouncer *Bouncer, ip string, httpReq *http.Request) error { req.Header.Set(crowdsecAppsecHostHeader, httpReq.Host) req.Header.Set(crowdsecAppsecURIHeader, httpReq.URL.String()) req.Header.Set(crowdsecAppsecUserAgent, httpReq.Header.Get("User-Agent")) + req.Header.Set("User-Agent", "Crowdsec-Bouncer-Traefik-Plugin/"+pluginVersion) res, err := bouncer.httpAppsecClient.Do(req) if err != nil { diff --git a/version.go b/version.go index 962d243..03eb0e0 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package crowdsec_bouncer_traefik_plugin //nolint:revive,stylecheck // pluginVersion is updated automatically by the release workflow. -var pluginVersion = "1.5.0" //nolint:gochecknoglobals +var pluginVersion = "1.6.X" //nolint:gochecknoglobals