Add X-Gitlab-Instance header to webhooks
What does this MR do and why?
This MR adds an X-Gitlab-Instance
header to webhooks.
How to set up and validate locally
- Enable the flag
Feature.enable(:webhooks_gitlab_instance_header)
- Choose a project, and go Settings > Webhooks.
- For URL, use https://webhook.site to generate a new webhook receiving URL to use.
- Click Add webhook.
- Scroll down to the bottom of the page, and click Test choose Push event.
- Visit your https://webhook.site site and you should receive a webhook. The headers should contain
X-Gitlab-Instance
(lowercase, because that site does this!) and it should be the correct host.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #31333 (closed)
Edited by Luke Duncalfe