Skip to content

Commit b7918fe

Browse files
authored
Merge pull request #54 from Moesif/express-minor-fix
default to localhost if hostname not found
2 parents 114f33d + 2a3de65 commit b7918fe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/formatEventDataAndSave.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function safeGetHostname(req) {
8585
try {
8686
return req.hostname;
8787
} catch(err) {
88-
return req.headers && req.headers['x-forwarded-host'];
88+
return (req.headers && req.headers['x-forwarded-host']) || 'localhost';
8989
}
9090
}
9191

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "moesif-nodejs",
3-
"version": "3.1.11",
3+
"version": "3.1.12",
44
"description": "Monitoring agent to log API calls to Moesif for deep API analytics",
55
"main": "lib/index.js",
66
"keywords": [

0 commit comments

Comments
 (0)