-
Notifications
You must be signed in to change notification settings - Fork 83
Add parameter to set a header containing the client ip #759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parameter to set a header containing the client ip #759
Conversation
| <%- end -%> | ||
| <%- end -%> | ||
| <%- if_p("ha_proxy.true_client_ip_header") do |header| -%> | ||
| http-request set-header <%= header %> %[src] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe remove two spaces in front of http-request so that this aligns with the rest of options when rendered?
6eb0438 to
0cbc7fe
Compare
b1tamara
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to run CI
maxmoehl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for CI.
649344e to
40176d6
Compare
This completes the True-Client-Ip feature introduced with #759. Three options are added to deal with the header: 1. forward_only_if_route_service: Forward only in route service scenario. This is the default behavior which adds support for the True-Client-Ip header in the route service scenario. 2. always_set: Always set the header, overwrite if existing. 3. always_forward: Always forward if existing, set otherwise. Co-authored-by: Clemens Hoffmann <clemens.hoffmann@sap.com>
Add property
ha_proxy.true_client_ip_header. This property allows to define a header name that stores the client src IP address, as seen by HAProxy.