diff options
author | 6543 <6543@obermui.de> | 2022-03-18 20:17:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 20:17:57 +0100 |
commit | 60fbaa90683add2a8af891fc2ca8448b9b75c92e (patch) | |
tree | 2cbb35f6b260986750452f0659623dd1eda59ae6 /modules/hostmatcher | |
parent | fda5b9fc3e6dd831987979f37fe39f08963b875d (diff) | |
download | gitea-60fbaa90683add2a8af891fc2ca8448b9b75c92e.tar.gz gitea-60fbaa90683add2a8af891fc2ca8448b9b75c92e.zip |
remove not needed (#19128)
Diffstat (limited to 'modules/hostmatcher')
-rw-r--r-- | modules/hostmatcher/hostmatcher.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/hostmatcher/hostmatcher.go b/modules/hostmatcher/hostmatcher.go index 9492a479f1..6c5c2a74d9 100644 --- a/modules/hostmatcher/hostmatcher.go +++ b/modules/hostmatcher/hostmatcher.go @@ -8,8 +8,6 @@ import ( "net" "path/filepath" "strings" - - "code.gitea.io/gitea/modules/util" ) // HostMatchList is used to check if a host or IP is in a list. @@ -104,11 +102,11 @@ func (hl *HostMatchList) checkIP(ip net.IP) bool { for _, builtin := range hl.builtins { switch builtin { case MatchBuiltinExternal: - if ip.IsGlobalUnicast() && !util.IsIPPrivate(ip) { + if ip.IsGlobalUnicast() && !ip.IsPrivate() { return true } case MatchBuiltinPrivate: - if util.IsIPPrivate(ip) { + if ip.IsPrivate() { return true } case MatchBuiltinLoopback: |