Loading
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
HeaderFuncwithPrepareRequest, which is called for every request afterHeadersand method-specific headers are applied. - Document that
PrepareRequestcan overrideHeadersand method-specific headers such asContent-TypeandAccept, 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
- Follow-up to !1570 (merged) (post-merge review feedback).
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