This commit is contained in:
Max Lerebourg
2022-09-29 10:08:07 +02:00
parent 6ab8ccb9db
commit feb40d9b5f
+2 -1
View File
@@ -192,7 +192,8 @@ func (a *Bouncer) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
RawQuery: fmt.Sprintf("ip=%v&banned=true", remoteHost),
}
body := crowdsecQuery(a, routeURL.String())
if !bytes.Equal(body, []byte("null")) {
nullByte := []byte("null")
if !bytes.Equal(body, nullByte) {
var decisions []Decision
err := json.Unmarshal(body, &decisions)
if err != nil {