Update packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts

Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Max Schmitt 2024-07-26 00:03:03 +02:00 committed by GitHub
parent 66a13d1748
commit e4f2e11ca0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -179,7 +179,7 @@ class SocksProxyConnection {
debugLogger.log('client-certificates', `error when connecting to target: ${error.message}`); debugLogger.log('client-certificates', `error when connecting to target: ${error.message}`);
const responseBody = 'Playwright client-certificate error: ' + error.message; const responseBody = 'Playwright client-certificate error: ' + error.message;
if (internalTLS?.alpnProtocol === 'h2') { if (internalTLS?.alpnProtocol === 'h2') {
// This method is available only in Node.js 18+ // This method is available only in Node.js 20+
if ('performServerHandshake' in http2) { if ('performServerHandshake' in http2) {
this._interceptClose = true; this._interceptClose = true;
// @ts-expect-error // @ts-expect-error