-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add parameter to set a header containing the client ip #759
Conversation
@@ -469,6 +469,9 @@ frontend http-in | |||
http-response add-header <%= rsp_header.gsub(/(?!:\\)( )/, '\ ') %> "<%= value.to_s.gsub(/(?!:\\) /, '\ ') %>" | |||
<%- 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
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
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
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.