build(electron): use live origin http protocol instead of file:// (#8464)

fix AF-1428
This commit is contained in:
pengx17
2024-10-15 05:42:52 +00:00
parent 9970138009
commit 3d3864fa5b
6 changed files with 55 additions and 121 deletions
@@ -3,10 +3,7 @@ import { app, shell } from 'electron';
app.on('web-contents-created', (_, contents) => {
const isInternalUrl = (url: string) => {
return (
(process.env.DEV_SERVER_URL &&
url.startsWith(process.env.DEV_SERVER_URL)) ||
url.startsWith('affine://') ||
url.startsWith('file://.')
process.env.DEV_SERVER_URL && url.startsWith(process.env.DEV_SERVER_URL)
);
};
/**