mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +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://cdn.jsdelivr.net is used by monaco editor on FE for Syntax Highlight
|
||||||
// https://github.com/suren-atoyan/monaco-react/issues/168
|
// https://github.com/suren-atoyan/monaco-react/issues/168
|
||||||
CSPDirectiveScriptSrc: {"'self' https://cdn.jsdelivr.net"},
|
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
|
// data: is used by monaco editor on FE for Syntax Highlight
|
||||||
CSPDirectiveFontSrc: {"'self' data:"},
|
CSPDirectiveFontSrc: {"'self' data:"},
|
||||||
CSPDirectiveStyleSrc: {"'self' 'unsafe-inline'"},
|
|
||||||
// object-src is needed to support code-server
|
// object-src is needed to support code-server
|
||||||
CSPDirectiveObjectSrc: {"'self'"},
|
CSPDirectiveObjectSrc: {"'self'"},
|
||||||
// blob: for loading the pwa manifest for code-server
|
// blob: for loading the pwa manifest for code-server
|
||||||
|
Reference in New Issue
Block a user