diff options
author | Joe Chen <jc@unknwon.io> | 2022-07-25 21:38:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 21:38:15 +0800 |
commit | db82024fc72c223a2e21410a0a28b55e22491f32 (patch) | |
tree | 2e3b72a9e210b6b5a4cb987a8411bbad2a4c23be /internal/netutil/netutil.go | |
parent | 780b33c63961b29b62986b3d4101770f3994b97b (diff) |
netutil: allow using `*` to match any hostname (#7111)
Diffstat (limited to 'internal/netutil/netutil.go')
-rw-r--r-- | internal/netutil/netutil.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 } } |