fix: allow file protocol streaming (#4441)

This commit is contained in:
Peng Xiao 2023-09-21 19:10:03 +08:00 committed by GitHub
parent 2521f2ed12
commit 872dc3521b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,20 @@ protocol.registerSchemesAsPrivileged([
},
]);
protocol.registerSchemesAsPrivileged([
{
scheme: 'file',
privileges: {
secure: false,
corsEnabled: true,
supportFetchAPI: true,
standard: true,
bypassCSP: true,
stream: true,
},
},
]);
const NETWORK_REQUESTS = ['/api', '/ws', '/socket.io', '/graphql'];
const webStaticDir = join(__dirname, '../resources/web-static');