mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix: failed to load blobs in electron (#1927)
This commit is contained in:
@@ -36,6 +36,7 @@ export function registerProtocol() {
|
||||
const realpath = toAbsolutePath(url);
|
||||
// console.log('realpath', realpath, 'for', url);
|
||||
callback(realpath);
|
||||
return true;
|
||||
});
|
||||
|
||||
protocol.registerFileProtocol('assets', (request, callback) => {
|
||||
@@ -43,6 +44,7 @@ export function registerProtocol() {
|
||||
const realpath = toAbsolutePath(url);
|
||||
// console.log('realpath', realpath, 'for', url);
|
||||
callback(realpath);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -60,7 +62,6 @@ export function registerProtocol() {
|
||||
'DELETE',
|
||||
'OPTIONS',
|
||||
];
|
||||
// responseHeaders['Content-Security-Policy'] = ["default-src 'self'"];
|
||||
}
|
||||
|
||||
callback({ responseHeaders });
|
||||
|
||||
Reference in New Issue
Block a user