Skip to content

Commit

Permalink
feat: pass X-Forwarded-For header to authorization service
Browse files Browse the repository at this point in the history
  • Loading branch information
bartjkdp committed Dec 14, 2023
1 parent d0f3585 commit 5524bee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/filter-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit 5524bee

Please sign in to comment.