From 5524bee5e318ea30ef670392f1a0a41da5f57c55 Mon Sep 17 00:00:00 2001 From: Bart Jeukendrup Date: Thu, 14 Dec 2023 16:29:53 +0100 Subject: [PATCH] feat: pass X-Forwarded-For header to authorization service --- cmd/filter-proxy/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/filter-proxy/main.go b/cmd/filter-proxy/main.go index 9012b7c..16a71ed 100644 --- a/cmd/filter-proxy/main.go +++ b/cmd/filter-proxy/main.go @@ -326,6 +326,8 @@ func authorizeRequestWithService(config *config.Config, backend config.Backend, request.Header.Set("Authorization", r.Header.Get("Authorization")) } + request.Header.Set("X-Forwarded-For", utils.ReadUserIP(r)) + client := &http.Client{ Timeout: 10 * time.Second, }