Skip to content

Commit

Permalink
fix: websocket path check
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipraty committed Jun 8, 2024
1 parent 5a0abf7 commit b5bbe4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5bbe4e

Please sign in to comment.