File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff 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
8287func (hl * HostMatchList ) IsEmpty () bool {
8388 return hl == nil || (len (hl .builtins ) == 0 && len (hl .patterns ) == 0 && len (hl .ipNets ) == 0 )
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments