diff --git a/auth/middleware_test.go b/auth/middleware_test.go index f4ff340be7334b4a05679f8102417869c946fbde..2289ee9a1b4737c0b63125f9e4d7c7cc191fedde 100644 --- a/auth/middleware_test.go +++ b/auth/middleware_test.go @@ -3,6 +3,7 @@ import ( "context" "encoding/json" + "net" "net/http" "strings" "testing" @@ -165,6 +166,12 @@ if err != nil { panic(err) } crypto.InitCrypto(conf) + + // This doesn't get populated because we can't use config.LoadFile + _, local4, _ := net.ParseCIDR("127.0.0.1/8") + _, local6, _ := net.ParseCIDR("::1/64") + config.InternalIPNet = append(config.InternalIPNet, *local4) + config.InternalIPNet = append(config.InternalIPNet, *local6) } func middleware() (http.HandlerFunc, *context.Context, *bool) {