From 48e5d7b3a2f34f53c71b206d3b81eb93d2f018bf Mon Sep 17 00:00:00 2001 From: Egor Aristov Date: Wed, 19 Feb 2025 12:41:08 +0300 Subject: [PATCH] block local ips and service worker; util function to resolve arbitrary 'host-like' string, unit testing --- internal/extractors/pwextractor/pwextractor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/extractors/pwextractor/pwextractor.go b/internal/extractors/pwextractor/pwextractor.go index 1876b18..8efcec9 100644 --- a/internal/extractors/pwextractor/pwextractor.go +++ b/internal/extractors/pwextractor/pwextractor.go @@ -251,7 +251,7 @@ func (e *PwExtractor) allowHost(rawUrl string) (bool, error) { deny := ip.IsPrivate() || ip.IsLoopback() || ip.IsUnspecified() || ip.IsLinkLocalUnicast() || ip.IsMulticast() deny = deny || e.proxyIP.Equal(ip) if deny { - log.Debugf("Banned address: %s", rawUrl) + log.Warnf("Banned address: %s", rawUrl) return false, nil } }