fix(browser-use): harden browser settings state

This commit is contained in:
Simos Mikelatos
2026-06-24 15:36:25 +00:00
parent 8c31ebcc63
commit 9457651fdd
9 changed files with 180 additions and 27 deletions

View File

@@ -48,9 +48,7 @@ export function createWebSocketServer(
&& requestUrl.pathname.endsWith('/viewer/websockify')
) {
const token = getBrowserUseViewerToken(requestUrl, info.req.headers as Record<string, unknown>);
if (dependencies.authenticateBrowserUseViewer?.(requestUrl.pathname, token)) {
return true;
}
return Boolean(dependencies.authenticateBrowserUseViewer?.(requestUrl.pathname, token));
}
return verifyWebSocketClient(info, dependencies.verifyClient);
}),