feat(api): Add support for custom HTTP headers via config (which can point to environment variables)

Description

  • Add custom_headers section to host config with support for direct header values and values loaded from environment variables
  • Apply headers to both GitLab client operations and direct API calls
  • Add debug redaction for sensitive headers (Proxy-Authorization, Cf-Access-Client-Secret)
  • Allows support for authentication proxies like Google IAP and Cloudflare Access
  • Add test coverage for all header scenarios
  • Update README with usage examples and authentication proxy patterns

Related Issues

Fixes #1037 (closed)

How has this been tested?

Unit tests, and manually by using it to perform operations on my IAP-protected self hosted Gitlab instance.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Henri Cook

Merge request reports

Loading