desktop v2 migration finalising (#36912)

This commit is contained in:
Brendan Allan
2026-07-15 03:56:47 +08:00
committed by GitHub
parent bfddf05782
commit 4a181c3574
9 changed files with 155 additions and 46 deletions
+5 -1
View File
@@ -36,6 +36,7 @@ protocol.registerSchemesAsPrivileged([
secure: true,
standard: true,
supportFetchAPI: true,
stream: true,
},
},
])
@@ -266,7 +267,10 @@ export function registerRendererProtocol() {
}
try {
const response = await net.fetch(pathToFileURL(file).toString())
const range = request.headers.get("range")
const response = await net.fetch(pathToFileURL(file).toString(), {
headers: range ? { range } : undefined,
})
if (response.status >= 400) {
writeLog(
"protocol",