This commit addresses an issue where the IP address of the CDN node was being forwarded in the X-Forwarded-For header, instead of the original client's IP address. By correctly appending the client's IP to the existing X-Forwarded-For header value (if present) or setting it as the initial value (if not), we ensure that the original client IP is preserved and forwarded correctly when requests pass through a CDN. This change enhances the accuracy of client IP tracking and improves compatibility with downstream services relying on the X-Forwarded-For header for client IP identification."
… a CDN
This commit addresses an issue where the IP address of the CDN node was being forwarded in the X-Forwarded-For header, instead of the original client's IP address. By correctly appending the client's IP to the existing X-Forwarded-For header value (if present) or setting it as the initial value (if not), we ensure that the original client IP is preserved and forwarded correctly when requests pass through a CDN. This change enhances the accuracy of client IP tracking and improves compatibility with downstream services relying on the X-Forwarded-For header for client IP identification."