workhorse: Add AdoptCfRayHeader configuration option

What does this MR do and why?

This change introduces a new configuration flag adoptCfRayHeader that allows GitLab Workhorse to adopt the Cloudflare Cf-Ray header as the correlation ID when both propagateCorrelationID and adoptCfRayHeader are enabled.

When enabled, the correlation middleware will:

  • Use the Cf-Ray header value as the correlation ID if present
  • Fall back to X-Request-ID if Cf-Ray is not present
  • Generate a new ID if neither header is available

This is useful for deployments behind Cloudflare where tracking requests using the Cf-Ray ID provides better end-to-end visibility.

Changes:

  • Add adoptCfRayHeader boolean flag to configuration
  • Update LabKit to v1.29.0 which includes WithAdoptCfRayHeader support
  • Pass correlation.WithAdoptCfRayHeader() option when flag is enabled
  • Add comprehensive test coverage for the new feature

References

Screenshots or screen recordings

Before After

n/a

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading