From 9b1b4b543358c212a3da2b480d361d0c1375b279 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Sun, 27 Jun 2021 21:21:09 +0200 Subject: Refactor Webhook + Add X-Hub-Signature (#16176) This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`. ## :warning: BREAKING :warning: * The `Secret` field is no longer passed as part of the payload. * "Breaking" change (or fix?): The webhook history shows the real called url and not the url registered in the webhook (`deliver.go`@129). Close #16115 Fixes #7788 Fixes #11755 Co-authored-by: zeripath --- services/webhook/discord.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'services/webhook/discord.go') diff --git a/services/webhook/discord.go b/services/webhook/discord.go index 378d9ff725..ea3879f198 100644 --- a/services/webhook/discord.go +++ b/services/webhook/discord.go @@ -97,9 +97,6 @@ var ( redColor = color("ff3232") ) -// SetSecret sets the discord secret -func (d *DiscordPayload) SetSecret(_ string) {} - // JSONPayload Marshals the DiscordPayload to json func (d *DiscordPayload) JSONPayload() ([]byte, error) { json := jsoniter.ConfigCompatibleWithStandardLibrary -- cgit v1.2.3