Add custom webhook headers
requested to merge gitlab-community/gitlab-org/gitlab:17290-add-ability-to-specify-custom-webhook-headers into master
What does this MR do and why?
Add custom webhook headers. Custom headers can be set while creating and editing a webhook. They are reset when the target url changes (same as the secret token or url variables).
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
bin/rails runner "Feature.enable :custom_webhook_headers"
- Open https://public.requestbin.com/r
- Create a new webhook at
/flightjs/Flight/-/hooks
- Set the URL of the webhook to the endpoint url of the request bin
- Add one or more custom headers
- Save the webhook
- Test a webhook event
- Check request bin to verify the custom headers were included in the request headers
- Check the webhook logs to verify that the custom headers are included, but with their values redacted
Related to #17290 (closed)
Edited by Niklas van Schrick