diff --git a/frontend/electron/main.ts b/frontend/electron/main.ts index 92ee9cb..55e18ea 100644 --- a/frontend/electron/main.ts +++ b/frontend/electron/main.ts @@ -1,4 +1,4 @@ -import { app, BrowserWindow, clipboard, dialog, ipcMain, protocol } from 'electron'; +import { app, BrowserWindow, clipboard, dialog, ipcMain, protocol, shell } from 'electron'; import { spawn, type ChildProcess } from 'node:child_process'; import { randomBytes } from 'node:crypto'; import { readFileSync } from 'node:fs'; @@ -26,6 +26,42 @@ protocol.registerSchemesAsPrivileged([ { scheme: 'app', privileges: { standard: true, secure: true, supportFetchAPI: true } }, ]); +/** + * Content-Security-Policy applied to every page this app loads. + * + * The production policy forbids inline scripts entirely (the Vite bundle is + * external), so an injected `