newrelic 9.10.0 → 9.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NEWS.md +4 -0
- package/lib/serverless/api-gateway.js +9 -2
- package/package.json +1 -1
package/NEWS.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
### v9.10.1 (2023-02-13)
|
|
2
|
+
|
|
3
|
+
* Fixed error with Lambda/ALB serverless instrumentation when no response headers were included
|
|
4
|
+
|
|
1
5
|
### v9.10.0 (2023-02-09)
|
|
2
6
|
|
|
3
7
|
* Exposed a method on [API](https://newrelic.github.io/node-newrelic/API.html#obfuscateSql) to obfuscate sql: `newrelic.obfuscateSql`.
|
|
@@ -59,7 +59,8 @@ function normalizeQueryStringParameters(event) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Normalizes both request and response headers,
|
|
63
|
+
* either from Multi Value headers or "normal" headers to a
|
|
63
64
|
* lowercase key map with comma separated string
|
|
64
65
|
*
|
|
65
66
|
* @param {object} event The event with headers to normalize
|
|
@@ -67,8 +68,14 @@ function normalizeQueryStringParameters(event) {
|
|
|
67
68
|
* @returns {Object<string, string>} The normalized headers map
|
|
68
69
|
*/
|
|
69
70
|
function normalizeHeaders(event, lowerCaseKey = false) {
|
|
71
|
+
const headers = event.multiValueHeaders ?? event.headers
|
|
72
|
+
|
|
73
|
+
if (!headers) {
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
70
77
|
return Object.fromEntries(
|
|
71
|
-
Object.entries(
|
|
78
|
+
Object.entries(headers).map(([headerKey, headerValue]) => {
|
|
72
79
|
const newKey = lowerCaseKey ? headerKey.toLowerCase() : headerKey
|
|
73
80
|
|
|
74
81
|
if (Array.isArray(headerValue)) {
|