mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 11:38:59 +02:00
fix lint
This commit is contained in:
+2
-1
@@ -192,7 +192,8 @@ func (a *Bouncer) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||||||
RawQuery: fmt.Sprintf("ip=%v&banned=true", remoteHost),
|
RawQuery: fmt.Sprintf("ip=%v&banned=true", remoteHost),
|
||||||
}
|
}
|
||||||
body := crowdsecQuery(a, routeURL.String())
|
body := crowdsecQuery(a, routeURL.String())
|
||||||
if !bytes.Equal(body, []byte("null")) {
|
nullByte := []byte("null")
|
||||||
|
if !bytes.Equal(body, nullByte) {
|
||||||
var decisions []Decision
|
var decisions []Decision
|
||||||
err := json.Unmarshal(body, &decisions)
|
err := json.Unmarshal(body, &decisions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user