added group promotions

This commit is contained in:
2024-11-14 06:46:53 +02:00
parent b154de8251
commit ff4c4bb8d8
6 changed files with 825 additions and 11 deletions

View File

@@ -258,15 +258,17 @@ export function setupContentSecurityPolicy(customScheme: string): void {
// Create the Content Security Policy (CSP) string
const csp = `
default-src 'self' ${allowedSources.join(' ')};
frame-src ${frameSources.join(' ')};
script-src 'self' 'wasm-unsafe-eval' 'unsafe-inline' 'unsafe-eval' ${allowedSources.join(' ')};
object-src 'self';
connect-src ${connectSources.join(' ')};
img-src 'self' data: blob: ${allowedSources.join(' ')};
style-src 'self' 'unsafe-inline';
font-src 'self' data:;
`.replace(/\s+/g, ' ').trim();
default-src 'self' ${allowedSources.join(' ')};
frame-src ${frameSources.join(' ')};
script-src 'self' 'wasm-unsafe-eval' 'unsafe-inline' 'unsafe-eval' ${allowedSources.join(' ')};
object-src 'self';
connect-src ${connectSources.join(' ')};
img-src 'self' data: blob: ${allowedSources.join(' ')};
media-src 'self' blob: ${allowedSources.join(' ')};
style-src 'self' 'unsafe-inline';
font-src 'self' data:;
`.replace(/\s+/g, ' ').trim();
// Get the request URL and origin
const requestUrl = details.url;