mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 02:54:31 +00:00
Browser relay: accept raw gateway token in extension auth
(cherry picked from commit e682a768d0)
This commit is contained in:
committed by
Peter Steinberger
parent
d00d814ad1
commit
bb8f538cd4
@@ -277,6 +277,23 @@ describe("chrome extension relay server", () => {
|
||||
ext.close();
|
||||
});
|
||||
|
||||
it("accepts raw gateway token for relay auth compatibility", async () => {
|
||||
const port = await getFreePort();
|
||||
cdpUrl = `http://127.0.0.1:${port}`;
|
||||
await ensureChromeExtensionRelayServer({ cdpUrl });
|
||||
|
||||
const versionRes = await fetch(`${cdpUrl}/json/version`, {
|
||||
headers: { "x-openclaw-relay-token": TEST_GATEWAY_TOKEN },
|
||||
});
|
||||
expect(versionRes.status).toBe(200);
|
||||
|
||||
const ext = new WebSocket(
|
||||
`ws://127.0.0.1:${port}/extension?token=${encodeURIComponent(TEST_GATEWAY_TOKEN)}`,
|
||||
);
|
||||
await waitForOpen(ext);
|
||||
ext.close();
|
||||
});
|
||||
|
||||
it(
|
||||
"tracks attached page targets and exposes them via CDP + /json/list",
|
||||
async () => {
|
||||
|
||||
Reference in New Issue
Block a user