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 réponse
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions