1
0
Fork 0

Propagate insecure in white list.

This commit is contained in:
Ludovic Fernandez 2018-03-08 15:08:03 +01:00 committed by Traefiker Bot
parent 862957c30c
commit 59f7b2ea98
2 changed files with 55 additions and 6 deletions

View file

@ -17,10 +17,10 @@ type IP struct {
// NewIP builds a new IP given a list of CIDR-Strings to whitelist
func NewIP(whitelistStrings []string, insecure bool) (*IP, error) {
if len(whitelistStrings) == 0 && !insecure {
return nil, errors.New("no whiteListsNet provided")
return nil, errors.New("no white list provided")
}
ip := IP{}
ip := IP{insecure: insecure}
if !insecure {
for _, whitelistString := range whitelistStrings {