Skip to content

Commit

Permalink
Update CSP to fix PDF download in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
MWedl committed Jan 15, 2025
1 parent f803a20 commit eeb42c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/reportcreator_api/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,10 @@ def remove_empty_items(lst=None):
'font-src': [SELF],
'worker-src': [SELF],
'connect-src': [SELF, 'data:', 'https://portal.sysreptor.com'],
'frame-src': [SELF],
'frame-ancestors': [SELF],
'form-action': [SELF],
# PDF.js in Firefox requires "blob:" for saving/downloading PDFs
'frame-src': [SELF, 'blob:'],
# nuxt, vuetify and markdown preview use inline styles
'style-src': [SELF, UNSAFE_INLINE],
'script-src': [
Expand Down
3 changes: 3 additions & 0 deletions packages/frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export default defineNuxtConfig({
optimizeDeps: {
include: ['vuedraggable', 'monaco-editor', '@github/webauthn-json/browser-ponyfill'],
},
worker: {
format: 'es',
},
server: {
proxy: {
'/api': {
Expand Down

0 comments on commit eeb42c6

Please sign in to comment.