From 773f001239e58900d3a5c3314494c0909e706b49 Mon Sep 17 00:00:00 2001 From: Max Lerebourg Date: Thu, 29 Sep 2022 11:18:35 +0200 Subject: [PATCH] fix lint --- bouncer.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bouncer.go b/bouncer.go index 16756ab..da9c2e1 100644 --- a/bouncer.go +++ b/bouncer.go @@ -46,8 +46,8 @@ func CreateConfig() *Config { CrowdsecLapiScheme: "http", CrowdsecLapiHost: "crowdsec:8080", CrowdsecLapiKey: "", - UpdateIntervalSeconds: 10, - DefaultDecisionSeconds: 10, + UpdateIntervalSeconds: 60, + DefaultDecisionSeconds: 60, } } @@ -161,7 +161,6 @@ func (a *Bouncer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { if a.crowdsecMode == "stream" || a.crowdsecMode == "live" { isBanned, err := getDecision(remoteHost) - log.Printf("ip: %v, %v, %s", remoteHost, isBanned, err) if err == nil { if isBanned { rw.WriteHeader(http.StatusForbidden) @@ -219,7 +218,6 @@ func contains(source []string, target string) bool { func getDecision(clientIP string) (bool, error) { banned, isCached := cache.Get(clientIP) bannedString, isValid := banned.(string) - log.Printf("ip: %v, %v, %v", bannedString == cacheBannedValue, isCached, isValid) if isCached && isValid && len(bannedString) > 0 { return bannedString == cacheBannedValue, nil } @@ -301,7 +299,6 @@ func handleStreamCache(a *Bouncer, initialized bool) { } } for _, decision := range stream.Deleted { - log.Printf("ip deleted: %v", decision.Value) cache.Del(decision.Value) } a.crowdsecStreamHealthy = true