logdna / logger-node

A nodejs logger client for LogDNA
MIT License
34 stars 17 forks source link

fix: Remove invalid characters from the user-agent #39

Closed darinspivey closed 3 years ago

darinspivey commented 3 years ago

Part of the user-agent header value can be passed in during instantiation. This value should be stripped of all characters that would be considered invalid and thus cause an HTTP header error. Such characters are newlines and the like, so for our purposes, we will strip all non-printable characters from the user-agent value.

Semver: patch Fixes: https://github.com/logdna/logger-node/issues/34