mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-24 21:42:22 +02:00
[eric] windows 1.1.56 hotfix: webRequest.onHeadersReceived filter uses 'subFrame' (Electron camelCase) not 'sub_frame' (Chrome extension snake_case) — wrong name threw "Invalid type sub_frame" synchronously during app.whenReady, became an unhandledRejection, prevented the app from booting on 1.1.55
This commit is contained in:
+2
-1
@@ -1105,7 +1105,8 @@ app.whenReady().then(async () => {
|
||||
|
||||
// Strip X-Frame-Options and CSP frame-ancestors directives on iframe subframe loads so the Windows BrowserCard iframe fallback (used because <webview> tag commit segfaults on Chromium 144 + this Electron 40 CastLabs build) can render sites that normally refuse to be embedded. Scoped to types:['sub_frame'] so OAuth popups, the main app frame, deep-link redirects, and DRM license fetches keep their security headers intact. urls filter limits to http/https so file:// loads of the bundled frontend are untouched.
|
||||
session.defaultSession.webRequest.onHeadersReceived(
|
||||
{ urls: ['http://*/*', 'https://*/*'], types: ['sub_frame'] },
|
||||
// Electron's webRequest type name for iframes is 'subFrame' (camelCase), not the Chrome-extension 'sub_frame' — passing the wrong name throws "Invalid type sub_frame" synchronously which becomes an unhandledRejection and prevents the app from booting.
|
||||
{ urls: ['http://*/*', 'https://*/*'], types: ['subFrame'] },
|
||||
(details, callback) => {
|
||||
const headers = { ...(details.responseHeaders || {}) };
|
||||
for (const k of Object.keys(headers)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "openswarm",
|
||||
"version": "1.1.55",
|
||||
"version": "1.1.56",
|
||||
"description": "OpenSwarm — AI Agent Orchestrator",
|
||||
"author": "openswarm-ai",
|
||||
"main": "main.js",
|
||||
|
||||
Reference in New Issue
Block a user