Skip to content

fix: Fix CSP for monaco editor #5358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add more context
  • Loading branch information
BrunoQuaresma committed Dec 8, 2022
commit 25304ea5776457b8c5b326ad3f7cbb856cab7906
1 change: 1 addition & 0 deletions site/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ func cspHeaders(next http.Handler) http.Handler {
CSPDirectiveConnectSrc: {"'self'"},
CSPDirectiveChildSrc: {"'self'"},
// 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"},
// data: is used by monaco editor on FE for Syntax Highlight
CSPDirectiveFontSrc: {"'self' data:"},
Expand Down