@middy/http-header-normalizer 7.0.2 → 7.0.3
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/README.md +1 -1
- package/index.d.ts +2 -0
- package/index.js +5 -2
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
## License
|
|
41
41
|
|
|
42
|
-
Licensed under [MIT License](LICENSE). Copyright (c) 2017-
|
|
42
|
+
Licensed under [MIT License](LICENSE). Copyright (c) 2017-2026 [will Farrell](https://github.com/willfarrell), [Luciano Mammino](https://github.com/lmammino), and [Middy contributors](https://github.com/middyjs/middy/graphs/contributors).
|
|
43
43
|
|
|
44
44
|
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy?ref=badge_large">
|
|
45
45
|
<img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy.svg?type=large" alt="FOSSA Status" style="max-width:100%;">
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Copyright 2017 - 2026 will Farrell, Luciano Mammino, and Middy contributors.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
const exceptionsList = [
|
|
2
4
|
"ALPN",
|
|
3
5
|
"C-PEP",
|
|
@@ -13,6 +15,7 @@ const exceptionsList = [
|
|
|
13
15
|
"HTTP2-Settings",
|
|
14
16
|
"Last-Event-ID",
|
|
15
17
|
"MIME-Version",
|
|
18
|
+
"NEL",
|
|
16
19
|
"Optional-WWW-Authenticate",
|
|
17
20
|
"Sec-WebSocket-Accept",
|
|
18
21
|
"Sec-WebSocket-Extensions",
|
|
@@ -40,13 +43,13 @@ const normalizeHeaderKey = (key, canonical) => {
|
|
|
40
43
|
return lowerCaseKey;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
if (exceptions
|
|
46
|
+
if (Object.hasOwn(exceptions, lowerCaseKey)) {
|
|
44
47
|
return exceptions[lowerCaseKey];
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
return lowerCaseKey
|
|
48
51
|
.split("-")
|
|
49
|
-
.map((text) => (text[0] || "").toUpperCase() + text.
|
|
52
|
+
.map((text) => (text[0] || "").toUpperCase() + text.substring(1))
|
|
50
53
|
.join("-");
|
|
51
54
|
};
|
|
52
55
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/http-header-normalizer",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"description": "Http header normalizer middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"module": "./index.js",
|
|
14
|
+
"sideEffects": false,
|
|
14
15
|
"exports": {
|
|
15
16
|
".": {
|
|
16
17
|
"import": {
|
|
@@ -67,6 +68,6 @@
|
|
|
67
68
|
},
|
|
68
69
|
"gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431",
|
|
69
70
|
"devDependencies": {
|
|
70
|
-
"@middy/core": "7.0.
|
|
71
|
+
"@middy/core": "7.0.3"
|
|
71
72
|
}
|
|
72
73
|
}
|