summaryrefslogtreecommitdiffstats
path: root/models/webhook.go
diff options
context:
space:
mode:
authorLauris BH <lauris.buksis@zzdats.lv>2019-09-09 19:21:07 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2019-09-10 00:21:07 +0800
commit7eacdcf39a4de3a5ea2f234f9444753ee40d8d35 (patch)
treecc468ca2dd02724f5c88e3c796aff5014992b9f7 /models/webhook.go
parent6ddd3b0b470d16dfe62caf5fff21011cfff44a76 (diff)
downloadgitea-7eacdcf39a4de3a5ea2f234f9444753ee40d8d35.tar.gz
gitea-7eacdcf39a4de3a5ea2f234f9444753ee40d8d35.zip
Fix webhooks to use proxy from environment (#8116)
Diffstat (limited to 'models/webhook.go')
-rw-r--r--models/webhook.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/webhook.go b/models/webhook.go
index 67ae783759..f657c18792 100644
--- a/models/webhook.go
+++ b/models/webhook.go
@@ -973,6 +973,7 @@ func InitDeliverHooks() {
webhookHTTPClient = &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify},
+ Proxy: http.ProxyFromEnvironment,
Dial: func(netw, addr string) (net.Conn, error) {
conn, err := net.DialTimeout(netw, addr, timeout)
if err != nil {