@@ 3,6 3,7 @@ package auth
import (
"context"
"encoding/json"
+ "net"
"net/http"
"strings"
"testing"
@@ 165,6 166,12 @@ internal-ipnet=127.0.0.1/24,::1/64`))
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) {