aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-08-18 21:10:39 +0800
committerGitHub <noreply@github.com>2021-08-18 21:10:39 +0800
commitf9acad82ca231b2a094879e53134b0d91815ddf0 (patch)
tree31207c11f9d2c7135bfb31cbf1388d94724f1ddc /services/webhook
parent422c30d3157d9f06af43901a1c7978dd25ca12a5 (diff)
downloadgitea-f9acad82ca231b2a094879e53134b0d91815ddf0.tar.gz
gitea-f9acad82ca231b2a094879e53134b0d91815ddf0.zip
Add proxy settings and support for migration and webhook (#16704)
* Add proxy settings and support for migration and webhook * Fix default value * Add newline for example ini * Add lfs proxy support * Fix lint * Follow @zeripath's review * Fix git clone * Fix test * missgin http requests for proxy * use empty Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'services/webhook')
-rw-r--r--services/webhook/deliver.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/webhook/deliver.go b/services/webhook/deliver.go
index 8243fde1bb..d0e115b136 100644
--- a/services/webhook/deliver.go
+++ b/services/webhook/deliver.go
@@ -25,6 +25,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/graceful"
"code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/proxy"
"code.gitea.io/gitea/modules/setting"
"github.com/gobwas/glob"
)
@@ -260,7 +261,7 @@ var (
func webhookProxy() func(req *http.Request) (*url.URL, error) {
if setting.Webhook.ProxyURL == "" {
- return http.ProxyFromEnvironment
+ return proxy.Proxy()
}
once.Do(func() {