@elastic/ecs-helpers
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -48,3 +48,2 @@ // Licensed to Elasticsearch B.V. under one or more contributor | ||
method, | ||
url, | ||
headers, | ||
@@ -61,2 +60,8 @@ hostname, | ||
// Express can strip leading parts of `req.url` during routing, so we must use | ||
// https://expressjs.com/en/4x/api.html#req.originalUrl if available. | ||
// Fastify docs (https://fastify.dev/docs/latest/Reference/Request/) imply | ||
// that it might mutate `req.url` during routing as well. | ||
const url = req.originalUrl || req.url | ||
ecs.url = ecs.url || {} | ||
@@ -83,2 +88,3 @@ ecs.url.full = (socket && socket.encrypted ? 'https://' : 'http://') + headers.host + url | ||
ecs.url.domain = host | ||
// istanbul ignore next | ||
if (port) { | ||
@@ -85,0 +91,0 @@ ecs.url.port = Number(port) |
{ | ||
"name": "@elastic/ecs-helpers", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "ecs-logging-nodejs helpers", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26257
242