summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-10 21:06:59 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-10 21:06:59 -0500
commit6a23252edc36a3d99b35af69a310fd31f687f3cb (patch)
tree94b1355117f54a54596dad3f9bb2b56f9e6fec19 /modules/setting
parente407df54f000bf3e078e67f043571293e4edad5d (diff)
downloadgitea-6a23252edc36a3d99b35af69a310fd31f687f3cb.tar.gz
gitea-6a23252edc36a3d99b35af69a310fd31f687f3cb.zip
able to allow insecure certification of webhook for #891
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 55e0a79ab8..d71a8cda55 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -68,8 +68,11 @@ var (
ReverseProxyAuthUser string
// Webhook settings.
- WebhookTaskInterval int
- WebhookDeliverTimeout int
+ Webhook struct {
+ TaskInterval int
+ DeliverTimeout int
+ AllowInsecureCertification bool
+ }
// Repository settings.
RepoRootPath string
@@ -508,8 +511,10 @@ func newNotifyMailService() {
}
func newWebhookService() {
- WebhookTaskInterval = Cfg.Section("webhook").Key("TASK_INTERVAL").MustInt(1)
- WebhookDeliverTimeout = Cfg.Section("webhook").Key("DELIVER_TIMEOUT").MustInt(5)
+ sec := Cfg.Section("webhook")
+ Webhook.TaskInterval = sec.Key("TASK_INTERVAL").MustInt(1)
+ Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5)
+ Webhook.AllowInsecureCertification = sec.Key("ALLOW_INSECURE_CERTIFICATION").MustBool()
}
func NewServices() {