Skip to content

Commit

Permalink
improve code and app.ini.sample
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Nov 8, 2019
1 parent fb69cf2 commit 8b7d536
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion custom/conf/app.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ SKIP_TLS_VERIFY = false
PAGING_NUM = 10
; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy
PROXY_URL =
; All request hosts needed to proxy, you could use * to match the hosts.
; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
PROXY_HOSTS =

[mailer]
Expand Down
4 changes: 0 additions & 4 deletions modules/webhook/deliver.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ func webhookProxy() func(req *http.Request) (*url.URL, error) {
})

return func(req *http.Request) (*url.URL, error) {
if len(setting.Webhook.ProxyHosts) == 1 && setting.Webhook.ProxyHosts[0] == "*" {
return http.ProxyURL(setting.Webhook.ProxyURLFixed)(req)
}

for _, v := range hostMatchers {
if v.Match(req.URL.Host) {
return http.ProxyURL(setting.Webhook.ProxyURLFixed)(req)
Expand Down

0 comments on commit 8b7d536

Please sign in to comment.