mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 11:38:59 +02:00
🐛 fix all incoherence (#71)
* 🐛 fix all incoherence * 🐛 fix comment + lint
This commit is contained in:
+2
-3
@@ -23,9 +23,8 @@ type Checker struct {
|
||||
func NewChecker(trustedIPs []string) (*Checker, error) {
|
||||
checker := &Checker{}
|
||||
|
||||
for _, ipMask := range trustedIPs {
|
||||
// remove leading and trailing spaces
|
||||
ipMask = strings.TrimSpace(ipMask)
|
||||
for _, ipMaskRaw := range trustedIPs {
|
||||
ipMask := strings.TrimSpace(ipMaskRaw)
|
||||
if ipAddr := net.ParseIP(ipMask); ipAddr != nil {
|
||||
checker.authorizedIPs = append(checker.authorizedIPs, &ipAddr)
|
||||
logger.Debug(fmt.Sprintf("IP %v is trusted", ipAddr))
|
||||
|
||||
Reference in New Issue
Block a user