elastic / elastic/ecs-logging-nodejs

consider using `URL` for parsing in helpers.formatHttpRequest

Open
#52 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 `formatHttpRequest` is manually doing URL parsing. I think using the standard `url.URL` for parsing would fix potential issues with weird URLs.

Also, in the case of a hapi request object, there is an already parsed `request.url` available. Express request objects might have the same thing. Not sure about other frameworks (e.g. fastify).

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.