bdy 1.25.15-stage → 1.25.16-master
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/distTs/package.json +1 -1
- package/distTs/src/tunnel/http.js +8 -1
- package/package.json +1 -1
package/distTs/package.json
CHANGED
|
@@ -189,7 +189,14 @@ class TunnelHttp extends events_1.default {
|
|
|
189
189
|
// where the target is supposed to read it. Same treatment the worker gives x-forwarded-auth.
|
|
190
190
|
utils_1.TUNNEL_CLIENT_IP_HEADER,
|
|
191
191
|
];
|
|
192
|
-
|
|
192
|
+
// Connection is a case-insensitive token list (RFC 9110 §7.6.1): aiohttp answers
|
|
193
|
+
// `Connection: upgrade`, Firefox asks with `Connection: keep-alive, Upgrade`.
|
|
194
|
+
const connection = headers.connection;
|
|
195
|
+
const isUpgrade = typeof connection === 'string' &&
|
|
196
|
+
connection
|
|
197
|
+
.split(',')
|
|
198
|
+
.some((token) => token.trim().toLowerCase() === 'upgrade');
|
|
199
|
+
if (!(allowUpgrade && isUpgrade)) {
|
|
193
200
|
hop.push('upgrade');
|
|
194
201
|
hop.push('connection');
|
|
195
202
|
hop.push('keep-alive');
|