[26.1 backport] add support for DOCKER_CUSTOM_HEADERS env-var
- backport https://github.com/docker/cli/pull/5098
This environment variable allows for setting additional headers to be sent by the client. Headers set through this environment variable are added to headers set through the config-file (through the HttpHeaders field).
This environment variable can be used in situations where headers must be set for a specific invocation of the CLI, but should not be set by default, and therefore cannot be set in the config-file.
(cherry picked from commit 0d6b805256207aa5601956fa83ed94951b9f71b6)
- What I did
- How I did it
- How to verify it
- Description for the changelog
Add support for `DOCKER_CUSTOM_HEADERS` environment variable
This environment variable allows for setting additional headers to be sent by the client. Headers set through this environment variable are added to headers set through the config-file (through the HttpHeaders field).
This environment variable can be used in situations where headers must be set for a specific invocation of the CLI, but should not be set by default, and therefore cannot be set in the config-file.
- A picture of a cute animal (not mandatory but encouraged)
Codecov Report
Attention: Patch coverage is 66.66667% with 8 lines in your changes missing coverage. Please review.
Project coverage is 61.36%. Comparing base (
5dab297) to head (bc2aeee).
Additional details and impacted files
@@ Coverage Diff @@
## 26.1 #5112 +/- ##
==========================================
+ Coverage 61.35% 61.36% +0.01%
==========================================
Files 298 298
Lines 20712 20735 +23
==========================================
+ Hits 12707 12724 +17
- Misses 7103 7106 +3
- Partials 902 905 +3
superseded by https://github.com/docker/cli/pull/5271