mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix: Fix CSP style directive for Monaco editor (#5360)
This commit is contained in:
@ -269,9 +269,9 @@ func cspHeaders(next http.Handler) http.Handler {
|
||||
// https://cdn.jsdelivr.net is used by monaco editor on FE for Syntax Highlight
|
||||
// https://github.com/suren-atoyan/monaco-react/issues/168
|
||||
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:"},
|
||||
CSPDirectiveStyleSrc: {"'self' 'unsafe-inline'"},
|
||||
CSPDirectiveFontSrc: {"'self' data:"},
|
||||
// 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