fix: protocol.handle
not intercepting file protocol (#39048)
fix: protocol.handle not intercepting file protocol
This commit is contained in:
parent
f959fb0c96
commit
b142fce229
2 changed files with 23 additions and 2 deletions
|
@ -9,7 +9,7 @@ const { registerSchemesAsPrivileged, getStandardSchemes, Protocol } = process._l
|
|||
const ERR_FAILED = -2;
|
||||
const ERR_UNEXPECTED = -9;
|
||||
|
||||
const isBuiltInScheme = (scheme: string) => scheme === 'http' || scheme === 'https';
|
||||
const isBuiltInScheme = (scheme: string) => ['http', 'https', 'file'].includes(scheme);
|
||||
|
||||
function makeStreamFromPipe (pipe: any): ReadableStream {
|
||||
const buf = new Uint8Array(1024 * 1024 /* 1 MB */);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue