Skip to content

Commit ac003d7

Browse files
authored
docs: fix the docs around XFF behavior post v1.33.x (#41843)
## Description This PR clarifies the behavior of Original IP Detection extension around XFFs. Fix #41832 --- **Commit Message:** docs: fix the docs around XFF behavior post v1.33.x **Additional Description:** Clarified behavior for Original IP Detection extension around XFFs. **Risk Level:** Low **Testing:** CI **Docs Changes:** Added **Release Notes:** N/A Signed-off-by: Rohit Agrawal <[email protected]>
1 parent 7091d0a commit ac003d7

File tree

1 file changed

+31
-1
lines changed
  • api/envoy/extensions/http/original_ip_detection/xff/v3

1 file changed

+31
-1
lines changed

api/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,40 @@ message XffConfig {
3737
// When the remote IP address matches a trusted CIDR and the
3838
// :ref:`config_http_conn_man_headers_x-forwarded-for` header was sent, each entry
3939
// in the ``x-forwarded-for`` header is evaluated from right to left and the first
40-
// public non-trusted address is used as the original client address. If all
40+
// non-trusted address is used as the original client address. If all
4141
// addresses in ``x-forwarded-for`` are within the trusted list, the first (leftmost)
4242
// entry is used.
4343
//
44+
// .. warning::
45+
//
46+
// Starting with Envoy v1.33.0, private IP address ranges are **not** automatically skipped
47+
// when determining the original client address. We'll return the first address that is not
48+
// in the ``xff_trusted_cidrs`` list, even if it is a private IP address.
49+
//
50+
// If you want to skip private IP addresses, explicitly add them to the ``xff_trusted_cidrs``
51+
// list. For example:
52+
//
53+
// .. code-block:: yaml
54+
//
55+
// xff_trusted_cidrs:
56+
// cidrs:
57+
// - address_prefix: "10.0.0.0"
58+
// prefix_len: 8
59+
// - address_prefix: "172.16.0.0"
60+
// prefix_len: 12
61+
// - address_prefix: "192.168.0.0"
62+
// prefix_len: 16
63+
// - address_prefix: "127.0.0.0"
64+
// prefix_len: 8
65+
// - address_prefix: "fc00::"
66+
// prefix_len: 7
67+
// - address_prefix: "::1"
68+
// prefix_len: 128
69+
//
70+
// See :ref:`internal_address_config
71+
// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config>`
72+
// for more information about the v1.33.0 behavior change.
73+
//
4474
// This is typically used when requests are proxied by a
4575
// `CDN <https://en.wikipedia.org/wiki/Content_delivery_network>`_.
4676
//

0 commit comments

Comments
 (0)