mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 13:01:25 +00:00
feat(browser): add support for authenticated remote CDP profiles
This commit is contained in:
committed by
Peter Steinberger
parent
d0cb4e092f
commit
6e0daf0936
@@ -7,7 +7,7 @@ import WebSocket from "ws";
|
||||
import { ensurePortAvailable } from "../infra/ports.js";
|
||||
import { createSubsystemLogger } from "../logging.js";
|
||||
import { CONFIG_DIR } from "../utils.js";
|
||||
import { normalizeCdpWsUrl } from "./cdp.js";
|
||||
import { getHeadersWithAuth, normalizeCdpWsUrl } from "./cdp.js";
|
||||
import {
|
||||
type BrowserExecutable,
|
||||
resolveBrowserExecutableForPlatform,
|
||||
@@ -74,6 +74,7 @@ async function fetchChromeVersion(cdpUrl: string, timeoutMs = 500): Promise<Chro
|
||||
const base = cdpUrl.replace(/\/$/, "");
|
||||
const res = await fetch(`${base}/json/version`, {
|
||||
signal: ctrl.signal,
|
||||
headers: getHeadersWithAuth(`${base}/json/version`),
|
||||
});
|
||||
if (!res.ok) return null;
|
||||
const data = (await res.json()) as ChromeVersion;
|
||||
|
||||
Reference in New Issue
Block a user