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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南