fix: RSS feed CORS issue

- Close #1620
This commit is contained in:
JellyBrick
2024-10-14 04:03:51 +09:00
parent 0fcbe38837
commit 77bfe8e218

View File

@ -11,6 +11,7 @@ import {
shell,
dialog,
ipcMain,
protocol,
type BrowserWindowConstructorOptions,
} from 'electron';
import enhanceWebRequest, {
@ -83,6 +84,34 @@ if (!gotTheLock) {
app.exit();
}
protocol.registerSchemesAsPrivileged([
{
scheme: 'http',
privileges: {
standard: true,
bypassCSP: true,
allowServiceWorkers: true,
supportFetchAPI: true,
corsEnabled: true,
stream: true,
codeCache: true,
},
},
{
scheme: 'https',
privileges: {
standard: true,
bypassCSP: true,
allowServiceWorkers: true,
supportFetchAPI: true,
corsEnabled: true,
stream: true,
codeCache: true,
},
},
{ scheme: 'mailto', privileges: { standard: true } },
]);
// Ozone platform hint: Required for Wayland support
app.commandLine.appendSwitch('ozone-platform-hint', 'auto');
// SharedArrayBuffer: Required for downloader (@ffmpeg/core-mt)