fix(site): Fix CSP directives for monaco (#6709)

This commit is contained in:
Bruno Quaresma
2023-03-21 12:51:02 -07:00
committed by GitHub
parent 00860cf1c8
commit 5cbe360176
+2 -1
View File
@@ -326,7 +326,8 @@ func cspHeaders(next http.Handler) http.Handler {
CSPDirectiveScriptSrc: {"'self' https://cdn.jsdelivr.net"},
CSPDirectiveStyleSrc: {"'self' 'unsafe-inline' https://cdn.jsdelivr.net"},
// data: is used by monaco editor on FE for Syntax Highlight
CSPDirectiveFontSrc: {"'self' data:"},
CSPDirectiveFontSrc: {"'self' https://cdn.jsdelivr.net data:"},
CSPDirectiveWorkerSrc: {"'self' blob:"},
// object-src is needed to support code-server
CSPDirectiveObjectSrc: {"'self'"},
// blob: for loading the pwa manifest for code-server