mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 19:48:59 +02:00
🍱 fix loging
This commit is contained in:
+1
-2
@@ -3,7 +3,6 @@
|
|||||||
package ip
|
package ip
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -45,7 +44,7 @@ func NewChecker(trustedIPs []string) (*Checker, error) {
|
|||||||
// Contains checks if provided address is in the trusted IPs.
|
// Contains checks if provided address is in the trusted IPs.
|
||||||
func (ip *Checker) Contains(addr string) (bool, error) {
|
func (ip *Checker) Contains(addr string) (bool, error) {
|
||||||
if len(addr) == 0 {
|
if len(addr) == 0 {
|
||||||
return false, errors.New("Contains:noAddress")
|
return false, fmt.Errorf("Contains:noAddress")
|
||||||
}
|
}
|
||||||
|
|
||||||
ipAddr, err := parseIP(addr)
|
ipAddr, err := parseIP(addr)
|
||||||
|
|||||||
Reference in New Issue
Block a user