Fix moyai and fart
This commit is contained in:
@ -111,7 +111,7 @@ electron.app.whenReady().then(() => {
|
||||
function patchCsp(headers: Record<string, string[]>, header: string) {
|
||||
if (header in headers) {
|
||||
let patchedHeader = headers[header][0];
|
||||
for (const directive of ["style-src", "connect-src", "img-src", "font-src"]) {
|
||||
for (const directive of ["style-src", "connect-src", "img-src", "font-src", "media-src"]) {
|
||||
patchedHeader = patchedHeader.replace(new RegExp(`${directive}.+?;`), `${directive} * blob: data: 'unsafe-inline';`);
|
||||
}
|
||||
// TODO: Restrict this to only imported packages with fixed version.
|
||||
|
Reference in New Issue
Block a user