-
- Downloads
Implements --real-client-ip-header option. (#503)
* Implements -real-client-ip-header option. * The -real-client-ip-header determines what HTTP header is used for determining the "real client IP" of the remote client. * The -real-client-ip-header option supports the following headers: X-Forwarded-For X-ProxyUser-IP and X-Real-IP (default). * Introduces new realClientIPParser interface to allow for multiple polymorphic classes to decide how to determine the real client IP. * TODO: implement the more standard, but more complex `Forwarded` HTTP header. * Corrected order of expected/actual in test cases * Improved error message in getRemoteIP * Add tests for getRemoteIP and getClientString * Add comment explaining splitting of header * Update documentation on -real-client-ip-header w/o -reverse-proxy * Add PR number in changelog. * Fix typo repeated word: "it" Co-Authored-By:Joel Speed <Joel.speed@hotmail.co.uk> * Update extended configuration language * Simplify the language around dependance on -reverse-proxy Co-Authored-By:
Joel Speed <Joel.speed@hotmail.co.uk> * Added completions * Reorder real client IP header options * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by:
Isabelle COWAN-BERGMAN <Izzette@users.noreply.github.com> Co-authored-by:
Joel Speed <Joel.speed@hotmail.co.uk> Co-authored-by:
Henry Jenkins <henry@henryjenkins.name>
Showing
- CHANGELOG.md 1 addition, 0 deletionsCHANGELOG.md
- contrib/oauth2-proxy_autocomplete.sh 4 additions, 0 deletionscontrib/oauth2-proxy_autocomplete.sh
- docs/configuration/configuration.md 1 addition, 0 deletionsdocs/configuration/configuration.md
- main.go 1 addition, 0 deletionsmain.go
- oauthproxy.go 4 additions, 10 deletionsoauthproxy.go
- options.go 25 additions, 14 deletionsoptions.go
- options_test.go 43 additions, 0 deletionsoptions_test.go
- pkg/logger/logger.go 14 additions, 28 deletionspkg/logger/logger.go
- realclientip.go 102 additions, 0 deletionsrealclientip.go
- realclientip_test.go 176 additions, 0 deletionsrealclientip_test.go
Loading
Please register or sign in to comment