aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-06-27 21:21:09 +0200
committerGitHub <noreply@github.com>2021-06-27 20:21:09 +0100
commit9b1b4b543358c212a3da2b480d361d0c1375b279 (patch)
tree2bb767491b82bde8a76bf8b3148f8b7aaae9167c /templates
parent0b27b93728fd3cf2ecc82ac6a2b5859270543ef2 (diff)
downloadgitea-9b1b4b543358c212a3da2b480d361d0c1375b279.tar.gz
gitea-9b1b4b543358c212a3da2b480d361d0c1375b279.zip
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 <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/settings/webhook/history.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl
index cf4884531d..d2fe68738f 100644
--- a/templates/repo/settings/webhook/history.tmpl
+++ b/templates/repo/settings/webhook/history.tmpl
@@ -44,8 +44,8 @@
<div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
{{if .RequestInfo}}
<h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
- <pre class="webhook-info"><strong>Request URL:</strong> {{.URL}}
-<strong>Request method:</strong> {{if .HTTPMethod}}{{.HTTPMethod}}{{else}}POST{{end}}
+ <pre class="webhook-info"><strong>Request URL:</strong> {{.RequestInfo.URL}}
+<strong>Request method:</strong> {{if .RequestInfo.HTTPMethod}}{{.RequestInfo.HTTPMethod}}{{else}}POST{{end}}
{{ range $key, $val := .RequestInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
{{end}}</pre>
<h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5>