From db82024fc72c223a2e21410a0a28b55e22491f32 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Mon, 25 Jul 2022 21:38:15 +0800 Subject: netutil: allow using `*` to match any hostname (#7111) --- internal/netutil/netutil_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/netutil/netutil_test.go') diff --git a/internal/netutil/netutil_test.go b/internal/netutil/netutil_test.go index 9bd9c982..08b4dc50 100644 --- a/internal/netutil/netutil_test.go +++ b/internal/netutil/netutil_test.go @@ -31,6 +31,8 @@ func TestIsLocalHostname(t *testing.T) { {hostname: "192.168.123.45", allowlist: []string{"10.0.0.17"}, want: true}, // #11 {hostname: "gogs.local", allowlist: []string{"gogs.local"}, want: false}, // #12 + + {hostname: "192.168.123.45", allowlist: []string{"*"}, want: false}, // #13 } for _, test := range tests { t.Run("", func(t *testing.T) { -- cgit v1.2.3