Skip to content
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

Merged

Conversation

hoffmaen
Copy link
Contributor

@hoffmaen hoffmaen commented Feb 4, 2025

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.

@hoffmaen hoffmaen requested a review from CFN-CI as a code owner February 4, 2025 12:51
@hoffmaen hoffmaen requested a review from a team February 4, 2025 12:51
@@ -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]
Copy link
Contributor

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?

@hoffmaen hoffmaen force-pushed the feat/true_client_ip_hdr branch from 6eb0438 to 0cbc7fe Compare February 4, 2025 13:14
@b1tamara b1tamara added the run-ci Allow this PR to be tested on Concourse label Feb 4, 2025
b1tamara
b1tamara previously approved these changes Feb 4, 2025
Copy link
Contributor

@b1tamara b1tamara left a 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
maxmoehl previously approved these changes Feb 6, 2025
Copy link
Member

@maxmoehl maxmoehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for CI.

@hoffmaen hoffmaen force-pushed the feat/true_client_ip_hdr branch from 649344e to 40176d6 Compare February 10, 2025 13:59
@hoffmaen hoffmaen requested a review from a team as a code owner February 10, 2025 13:59
@maxmoehl maxmoehl merged commit 187de6d into cloudfoundry:master Feb 11, 2025
4 checks passed
@hoffmaen hoffmaen deleted the feat/true_client_ip_hdr branch February 12, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-ci Allow this PR to be tested on Concourse
Projects
Development

Successfully merging this pull request may close these issues.

4 participants