elastic / elastic/ecs-logging-nodejs

consider parsing Forwarded/X-Real-Ip/X-Forwarded-For headers to client.ip

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.