You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cdp-proxy): add /json endpoint for Playwright connectOverCDP support
The CDP proxy on port 9222 previously only implemented /json/version,
which returned the WebSocket URL but didn't support target discovery.
Playwright's connectOverCDP() fetches /json to discover browser targets
before establishing a WebSocket connection. Without this endpoint, using
`http://127.0.0.1:9222` with agent-browser or Playwright would fail, even
though direct WebSocket connections (ws://127.0.0.1:9222) worked fine.
This change:
- Adds /json and /json/list endpoints that proxy to Chrome's /json
- Rewrites webSocketDebuggerUrl and devtoolsFrontendUrl in the response
to use the proxy's host instead of Chrome's internal host
- Enables `agent-browser --cdp http://127.0.0.1:9222` to work correctly
0 commit comments