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 Respuesta
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
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas