elastic / elastic/ecs-logging-nodejs
consider parsing Forwarded/X-Real-Ip/X-Forwarded-For headers to client.ip
Open
agent-nodejs
- Dominant language
- JavaScript
- Stars
- 69
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
Currently `helpers.formatHttpRequest` mainly uses `req.socket.remoteAddress` for the "client.ip" ECS field. It could consider using some of the HTTP request headers (esp. X-Forwarded-For) to set this. If using Express, then `req.ip` is used which *sometimes* will use X-Forwarded-For, depending on user configuration.
Contributor guide
Assessment
This issue has not been assessed yet.