From a08b20dc5e76b3d1a24454eb7a5249b5f82111b1 Mon Sep 17 00:00:00 2001 From: Bart Jeukendrup Date: Thu, 5 Oct 2023 10:35:35 +0100 Subject: [PATCH] Add envSubst support for basic password authentication --- cmd/filter-proxy/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/filter-proxy/main.go b/cmd/filter-proxy/main.go index 52b0825..02d45c4 100644 --- a/cmd/filter-proxy/main.go +++ b/cmd/filter-proxy/main.go @@ -146,7 +146,8 @@ func main() { transport := &http.Transport{TLSClientConfig: tlsConfig} if backend.Auth.Basic.Username != "" && backend.Auth.Basic.Password != "" { - backendRequest.SetBasicAuth(backend.Auth.Basic.Username, backend.Auth.Basic.Password) + parsedPassword := utils.EnvSubst(backend.Auth.Basic.Password) + backendRequest.SetBasicAuth(backend.Auth.Basic.Username, parsedPassword) } for headerKey, headerValue := range backend.Auth.Header {