Skip to content

Commit 78dabdd

Browse files
authored
fix merge (#20819)
1 parent e5d2031 commit 78dabdd

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

modules/hostmatcher/hostmatcher.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ func (hl *HostMatchList) AppendBuiltin(builtin string) {
7878
hl.builtins = append(hl.builtins, builtin)
7979
}
8080

81+
// AppendPattern appends more pattern to match
82+
func (hl *HostMatchList) AppendPattern(pattern string) {
83+
hl.patterns = append(hl.patterns, pattern)
84+
}
85+
8186
// IsEmpty checks if the checklist is empty
8287
func (hl *HostMatchList) IsEmpty() bool {
8388
return hl == nil || (len(hl.builtins) == 0 && len(hl.patterns) == 0 && len(hl.ipNets) == 0)

services/migrations/migrate.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,5 +474,10 @@ func Init() error {
474474
allowList.AppendBuiltin(hostmatcher.MatchBuiltinPrivate)
475475
allowList.AppendBuiltin(hostmatcher.MatchBuiltinLoopback)
476476
}
477+
478+
if setting.Proxy.Enabled && setting.Proxy.ProxyURLFixed != nil {
479+
allowList.AppendPattern(setting.Proxy.ProxyURLFixed.Host)
480+
}
481+
477482
return nil
478483
}

0 commit comments

Comments
 (0)