Not getting x-forwarded-for header from alb to service on ECS

0

x-forwarded-for header is not being to nodejs service deployed as service on ECS ( Fargate) . Checked all settings on ALB. X-Forwarded-For setting is append on ALB. Not able to figure out the issue. Please help

1 回答
0

Hi Vix,

It appears that you have your ALB configured to append the X-Forwarded-For headers, so those should be at least reaching your endpoint for nodejs to take action.

With nodejs, the headers are seen as an array, so some extraction may be needed there. You could possibly have those headers in an array for nodejs and call out the one you are looking for. ie:request.headers[“X-Forwarded-For”]

There is also some information on Github that may beneficial to check regarding the client IP address if that is truly what you need to key in on.

Hope this helps!

AWS
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则