mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): Fix CSP directives for monaco (#6709)
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user