rekwest 4.2.2 → 4.2.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/dist/postflight.js +1 -1
- package/package.json +2 -2
- package/src/postflight.mjs +2 -1
package/dist/postflight.js
CHANGED
|
@@ -74,7 +74,7 @@ const postflight = (req, res, options, {
|
|
|
74
74
|
if (!(0, _utils.sameOrigin)(location, url)) {
|
|
75
75
|
Reflect.set(options, 'h2', false);
|
|
76
76
|
if ([_constants.requestCredentials.omit, _constants.requestCredentials.sameOrigin].includes(credentials)) {
|
|
77
|
-
Reflect.deleteProperty(options.headers,
|
|
77
|
+
Object.keys(options.headers).filter(it => new RegExp(HTTP2_HEADER_AUTHORIZATION, 'i').test(it)).forEach(it => Reflect.deleteProperty(options.headers, it));
|
|
78
78
|
location.password = location.username = '';
|
|
79
79
|
if (credentials === _constants.requestCredentials.omit) {
|
|
80
80
|
options.cookies = false;
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@babel/eslint-parser": "^7.19.1",
|
|
14
14
|
"@babel/preset-env": "^7.20.2",
|
|
15
15
|
"c8": "^7.12.0",
|
|
16
|
-
"eslint": "^8.
|
|
16
|
+
"eslint": "^8.29.0",
|
|
17
17
|
"eslint-config-ultra-refined": "^2.10.0",
|
|
18
18
|
"mocha": "^10.1.0"
|
|
19
19
|
},
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"test:bail": "mocha --bail",
|
|
68
68
|
"test:cover": "c8 --include=src --reporter=lcov --reporter=text npm test"
|
|
69
69
|
},
|
|
70
|
-
"version": "4.2.
|
|
70
|
+
"version": "4.2.3"
|
|
71
71
|
}
|
package/src/postflight.mjs
CHANGED
|
@@ -83,7 +83,8 @@ export const postflight = (req, res, options, { reject, resolve }) => {
|
|
|
83
83
|
requestCredentials.omit,
|
|
84
84
|
requestCredentials.sameOrigin,
|
|
85
85
|
].includes(credentials)) {
|
|
86
|
-
|
|
86
|
+
Object.keys(options.headers).filter((it) => new RegExp(HTTP2_HEADER_AUTHORIZATION, 'i').test(it))
|
|
87
|
+
.forEach((it) => Reflect.deleteProperty(options.headers, it));
|
|
87
88
|
location.password = location.username = '';
|
|
88
89
|
if (credentials === requestCredentials.omit) {
|
|
89
90
|
options.cookies = false;
|