diff --git a/docs/cli/explanations/env.mdx b/docs/cli/explanations/env.mdx index ef1355577..036e55d50 100644 --- a/docs/cli/explanations/env.mdx +++ b/docs/cli/explanations/env.mdx @@ -33,6 +33,14 @@ SRC_HEADER_AUTHORIZATION="Bearer $(curl http://service.internal.corp)" SRC_HEADE In the above example, the headers `authorization: Bearer my-generated-token` and `extra: metadata` will be threaded to all HTTP requests to your instance. Multiple such headers can be supplied. +An alternative to the above when passing in multiple headers or headers with dashes is to make use of the `SRC_HEADERS` environment variable as follows: + +```sh +SRC_HEADERS="AUTHORIZATION:Bearer somerandom_string\nClient-ID:client-one\nextra:metadata" +``` + +Note: The different header keys and values need to separated by a new line ("\n"). In the above example, the headers `authorization: Bearer somerandom_string`, `client-id: client-one` and `extra: metadata` will be threaded to all HTTP requests to your instance. + Example passing env vars via a shell config file: In the .zshrc - ```bash