better naming on #891
This commit is contained in:
parent
485ea6f14f
commit
d02e45f985
7 changed files with 11 additions and 11 deletions
|
@ -90,7 +90,7 @@ TASK_INTERVAL = 1
|
||||||
; Deliver timeout in seconds
|
; Deliver timeout in seconds
|
||||||
DELIVER_TIMEOUT = 5
|
DELIVER_TIMEOUT = 5
|
||||||
; Allow insecure certification
|
; Allow insecure certification
|
||||||
ALLOW_INSECURE_CERTIFICATION = false
|
SKIP_TLS_VERIFY = false
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = false
|
ENABLED = false
|
||||||
|
|
|
@ -647,7 +647,7 @@ config.reset_password_code_lives = Reset Password Code Lives
|
||||||
config.webhook_config = Webhook Configuration
|
config.webhook_config = Webhook Configuration
|
||||||
config.task_interval = Task Interval
|
config.task_interval = Task Interval
|
||||||
config.deliver_timeout = Deliver Timeout
|
config.deliver_timeout = Deliver Timeout
|
||||||
config.allow_insecure_certification = Allow Insecure Certification
|
config.skip_tls_verify = Skip TLS Verify
|
||||||
config.mailer_config = Mailer Configuration
|
config.mailer_config = Mailer Configuration
|
||||||
config.mailer_enabled = Enabled
|
config.mailer_enabled = Enabled
|
||||||
config.mailer_name = Name
|
config.mailer_name = Name
|
||||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.5.13.0210 Beta"
|
const APP_VER = "0.5.13.0211 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -315,7 +315,7 @@ func DeliverHooks() {
|
||||||
req := httplib.Post(t.Url).SetTimeout(timeout, timeout).
|
req := httplib.Post(t.Url).SetTimeout(timeout, timeout).
|
||||||
Header("X-Gogs-Delivery", t.Uuid).
|
Header("X-Gogs-Delivery", t.Uuid).
|
||||||
Header("X-Gogs-Event", string(t.EventType)).
|
Header("X-Gogs-Event", string(t.EventType)).
|
||||||
SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.AllowInsecureCertification})
|
SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify})
|
||||||
|
|
||||||
switch t.ContentType {
|
switch t.ContentType {
|
||||||
case JSON:
|
case JSON:
|
||||||
|
|
|
@ -71,7 +71,7 @@ var (
|
||||||
Webhook struct {
|
Webhook struct {
|
||||||
TaskInterval int
|
TaskInterval int
|
||||||
DeliverTimeout int
|
DeliverTimeout int
|
||||||
AllowInsecureCertification bool
|
SkipTLSVerify bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repository settings.
|
// Repository settings.
|
||||||
|
@ -514,7 +514,7 @@ func newWebhookService() {
|
||||||
sec := Cfg.Section("webhook")
|
sec := Cfg.Section("webhook")
|
||||||
Webhook.TaskInterval = sec.Key("TASK_INTERVAL").MustInt(1)
|
Webhook.TaskInterval = sec.Key("TASK_INTERVAL").MustInt(1)
|
||||||
Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5)
|
Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5)
|
||||||
Webhook.AllowInsecureCertification = sec.Key("ALLOW_INSECURE_CERTIFICATION").MustBool()
|
Webhook.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool()
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServices() {
|
func NewServices() {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.5.13.0210 Beta
|
0.5.13.0211 Beta
|
|
@ -105,8 +105,8 @@
|
||||||
<dd>{{.Webhook.TaskInterval}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
<dd>{{.Webhook.TaskInterval}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||||
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.allow_insecure_certification"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Webhook.AllowInsecureCertification}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue