Thanks for your kindly reply,
It doesn’t work by using X-Forward-Forward.
I don’t fully understand the usage of X-Forward-Forward here. From what I understand, AWS cloudfront doesn’t contained a X-Forward-Forward header in their request.
And “the header modification is behind the CF WAF”, I don’t know if this kind of header modification would work.
Thanks again for your help, do you have a telegram? I can pay for this issue.
Amazon CloudFront now provides a CloudFront-Viewer-Address header that includes IP address and connection port information for requesting clients. The connection port field indicates the TCP source port used by the requesting client. Previously, IP address and client connection port information were available only in CloudFront access logs, making it harder to resolve issues or perform real-time decision-making based on these data. Now you can configure your CloudFront origin request policies to forward the CloudFront-Viewer-Address header to your origin servers. The header can also be used in CloudFront Functions when included in an origin request policy. The CloudFront-Viewer-Address header uses the following syntax: CloudFront-Viewer-Address: 127.0.0.1:4430