mirror of
https://github.com/gogs/gogs.git
synced 2025-05-26 01:11:53 +00:00
webhook: add headers to support spring config server (#5325)
Spring cloud config server dependency spring cloud config monitor looks for X-Github-Event condition PropertyPathEndpoint.class -> GithubPropertyPathNotificationExtractor.class if ("push".equals(headers.getFirst("X-Github-Event"))) {...}
This commit is contained in:
parent
87b229d280
commit
8bbf0293f5
@ -654,6 +654,8 @@ func (t *HookTask) deliver() {
|
|||||||
|
|
||||||
timeout := time.Duration(setting.Webhook.DeliverTimeout) * time.Second
|
timeout := time.Duration(setting.Webhook.DeliverTimeout) * time.Second
|
||||||
req := httplib.Post(t.URL).SetTimeout(timeout, timeout).
|
req := httplib.Post(t.URL).SetTimeout(timeout, timeout).
|
||||||
|
Header("X-Github-Delivery", t.UUID).
|
||||||
|
Header("X-Github-Event", string(t.EventType)).
|
||||||
Header("X-Gogs-Delivery", t.UUID).
|
Header("X-Gogs-Delivery", t.UUID).
|
||||||
Header("X-Gogs-Signature", t.Signature).
|
Header("X-Gogs-Signature", t.Signature).
|
||||||
Header("X-Gogs-Event", string(t.EventType)).
|
Header("X-Gogs-Event", string(t.EventType)).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user