- 最新
- 投票最多
- 评论最多
yes it is related with which WAF are you using for example
In AWS WAF, when used with an Application Load Balancer, there is an attribute called routing.http.xff_client_port.enabled. When set to true, this attribute allows the X-Forwarded-For header to preserve the source port that the client used to connect to the load balancer. By default, this attribute is set to false0\n\nIndicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer. The possible values are true and false. The default is false","pub_date":null}}.
If you need to forward the client port to your application, you should set this attribute to true. This will cause the Application Load Balancer to include the client's source port in the X-Forwarded-For header, which can then be read by your application.
This would depend on the underlying service calling WAF, rather than WAF itself. For example, for CloudFront, you could use the CloudFront-Viewer-Address header
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 4 年前
- AWS 官方已更新 2 年前