Skip to content

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

  1. Enable the flag
    Feature.enable(:webhooks_gitlab_instance_header)
  2. Choose a project, and go Settings > Webhooks.
  3. For URL, use https://webhook.site to generate a new webhook receiving URL to use.
  4. Click Add webhook.
  5. Scroll down to the bottom of the page, and click Test choose Push event.
  6. 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.

Related to #31333 (closed)

Edited by Luke Duncalfe

Merge request reports

Loading