From b5bbe4e8c2ee1d81662816d0a8538a62b873197c Mon Sep 17 00:00:00 2001 From: Lipraty Date: Sat, 8 Jun 2024 17:13:51 +0800 Subject: [PATCH] fix: websocket path check --- packages/core/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 9e15546..291311e 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -56,7 +56,7 @@ class Puppeteer extends Service { if (remote) { const endpointURL = new URL(endpoint) if (['ws:', 'wss:'].includes(endpointURL.protocol)) { - if (endpointURL.pathname === '/devtools/browser/') { + if (!endpointURL.pathname.startsWith('/devtools/browser/')) { throw new Error('invalid browserWSEndpoint for remote debugging') } options.browserWSEndpoint = endpoint