Skip to content

Commit

Permalink
Merge branch 'fix-mermaid' into 'main'
Browse files Browse the repository at this point in the history
Fix mermaid

See merge request reportcreator/reportcreator!733
  • Loading branch information
MWedl committed Oct 21, 2024
2 parents 04632db + 0262ce0 commit 06655b2
Show file tree
Hide file tree
Showing 12 changed files with 9,200 additions and 5,813 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Upcoming
* Fix mermaid diagram labels not rendered
* Disable CSP trusted types enforcement because of incompatibilities


## v2024.79 - 2024-10-15
* Add more granular file storage settings
* Add trusted types configuration to Content Security Policy
Expand Down
25 changes: 13 additions & 12 deletions api/src/reportcreator_api/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,18 +422,19 @@
'style-src': [SELF, UNSAFE_INLINE],
# hash of nuxt inline script injected in index.html
'script-src': [SELF, "'sha256-vfPLwqW0BNyGGLG6upxgxsXF+K7Jp/V2hJGlbPt7NJY='"],
'require-trusted-types-for': ["'script'"],
'trusted-types': [
'default', # required for vuetify, unhead, mermaid
'worker-url', # load web workers via import URL
'vue', # used by vue and markdown
'dompurify', # used by mermaid
"'allow-duplicates'", # dompurify is used twice as dependency
# monaco-editor policies
'defaultWorkerFactory', 'tokenizeToString', 'standaloneColorizer',
'editorViewLayer', 'domLineBreaksComputer', 'domLineBreaksComputer',
'diffEditorWidget', 'editorGhostText', 'diffReview', 'stickyScrollViewLayer',
],
# Trusted types are not compatible with django admin, django rest framework's browsable API, swagger UI and django debug toolbar
# 'require-trusted-types-for': ["'script'"],
# 'trusted-types': [
# 'default', # required for vuetify, unhead, mermaid
# 'worker-url', # load web workers via import URL
# 'vue', # used by vue and markdown
# 'dompurify', # used by mermaid
# "'allow-duplicates'", # dompurify is used twice as dependency
# # monaco-editor policies
# 'defaultWorkerFactory', 'tokenizeToString', 'standaloneColorizer',
# 'editorViewLayer', 'domLineBreaksComputer', 'domLineBreaksComputer',
# 'diffEditorWidget', 'editorGhostText', 'diffReview', 'stickyScrollViewLayer',
# ],
},
}

Expand Down
Loading

0 comments on commit 06655b2

Please sign in to comment.