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.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/netutil/netutil.go') diff --git a/internal/netutil/netutil.go b/internal/netutil/netutil.go index 8fef3115..2c457519 100644 --- a/internal/netutil/netutil.go +++ b/internal/netutil/netutil.go @@ -52,7 +52,7 @@ func init() { // allowlist). func IsBlockedLocalHostname(hostname string, allowlist []string) bool { for _, allow := range allowlist { - if hostname == allow { + if hostname == allow || allow == "*" { return false } } -- cgit v1.2.3