Skip to content

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
<%- 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
peanball pushed a commit that referenced this pull request Apr 8, 2025
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>
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