Use request preparation for Cells JWT headers

What does this MR do and why?

Contributes to !1570 (merged)

Problem

git.Client.HeaderFunc returned a header map instead of using the existing request callback shape. It also silently overrode static and method-specific headers, without documenting that behavior.

Solution

  • Replace HeaderFunc with PrepareRequest, which is called for every request after Headers and method-specific headers are applied.
  • Document that PrepareRequest can override Headers and method-specific headers such as Content-Type and Accept, but not headers added later by the transport (User-Agent, X-Forwarded-For, correlation and tracing). Implementations should only modify headers.
  • Add tests for header overrides and set the Cells Shell JWT directly on the request.

References

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.

Edited by Vasilii Iakliushin

Merge request reports

Loading
Loading