Skip to content

Commit 55bd5c0

Browse files
fix(front): Remove mermaid sandboxing as it conflicts with csp (#621)
## 📝 Description Default sandboxing provided by mermaid-js is not compatible with our CSPs since it uses src=`data:...` to forward the content that should be rendered in the iframe, so we're falling back to `secure`. ## ✅ Checklist - [ ] I have tested this change - [ ] This change requires documentation update
1 parent a0b8383 commit 55bd5c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

front/assets/js/report/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import DOMPurify from 'dompurify';
99
import * as toolbox from "js/toolbox";
1010
import { useEffect, useState } from "preact/hooks";
1111

12-
Mermaid.initialize({ startOnLoad: false, theme: `default`, securityLevel: `sandbox` });
12+
Mermaid.initialize({ startOnLoad: false, theme: `default`, securityLevel: `strict` });
1313
const md = MarkdownIt({
1414
html: true,
1515
linkify: false,

0 commit comments

Comments
 (0)