We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d28bd38 commit 72a56fdCopy full SHA for 72a56fd
modules/hostmatcher/hostmatcher.go
@@ -8,8 +8,6 @@ import (
8
"net"
9
"path/filepath"
10
"strings"
11
-
12
- "code.gitea.io/gitea/modules/util"
13
)
14
15
// 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 {
104
102
for _, builtin := range hl.builtins {
105
103
switch builtin {
106
case MatchBuiltinExternal:
107
- if ip.IsGlobalUnicast() && !util.IsIPPrivate(ip) {
+ if ip.IsGlobalUnicast() && !ip.IsPrivate() {
108
return true
109
}
110
case MatchBuiltinPrivate:
111
- if util.IsIPPrivate(ip) {
+ if ip.IsPrivate() {
112
113
114
case MatchBuiltinLoopback:
modules/util/net.go
modules/util/net_test.go
0 commit comments