Electron: Load app from custom protocol
This puts the app into its own origin so it doesn't have access to the filesystem via file:// URIs. Next step: migrate over localstorage & indexeddb data from the old origin...
This commit is contained in:
parent
b35903bb19
commit
fc4e1485ad
2 changed files with 56 additions and 2 deletions
|
@ -19,3 +19,11 @@ const { ipcRenderer } = require('electron');
|
|||
// expose ipcRenderer to the renderer process
|
||||
window.ipcRenderer = ipcRenderer;
|
||||
|
||||
// Allow the fetch API to load resources from this
|
||||
// protocol: this is necessary to load olm.wasm.
|
||||
// (Also mark it a secure although we've already
|
||||
// done this in the main process).
|
||||
webFrame.registerURLSchemeAsPrivileged('vector', {
|
||||
secure: true,
|
||||
supportFetchAPI: true,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue