@google-cloud/logging
Advanced tools
Comparing version 9.4.0 to 9.4.1
@@ -30,12 +30,16 @@ "use strict"; | ||
// Format request properties | ||
if (req.url) { | ||
if (req.url) | ||
requestUrl = req.url; | ||
const url = new URL(requestUrl); | ||
protocol = url.protocol; | ||
} | ||
// OriginalURL overwrites inferred url | ||
if ('originalUrl' in req && req.originalUrl) { | ||
if ('originalUrl' in req && req.originalUrl) | ||
requestUrl = req.originalUrl; | ||
const url = new URL(requestUrl); | ||
protocol = url.protocol; | ||
// Format protocol from valid URL | ||
if (requestUrl) { | ||
try { | ||
const url = new URL(requestUrl); | ||
protocol = url.protocol; | ||
} | ||
catch (e) { | ||
// Library should not panic | ||
} | ||
} | ||
@@ -42,0 +46,0 @@ req.method ? (requestMethod = req.method) : null; |
@@ -7,2 +7,9 @@ # Changelog | ||
### [9.4.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.4.0...v9.4.1) (2021-06-14) | ||
### Bug Fixes | ||
* allow unformatted originalURL input ([#1100](https://www.github.com/googleapis/nodejs-logging/issues/1100)) ([136f90b](https://www.github.com/googleapis/nodejs-logging/commit/136f90b0926c1a04521fddd7c82d0efbf7572521)) | ||
## [9.4.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.3.1...v9.4.0) (2021-06-11) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "@google-cloud/logging", | ||
"version": "9.4.0", | ||
"version": "9.4.1", | ||
"description": "Stackdriver Logging Client Library for Node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
3549297
59484