Adapt CSP for new ToastUi editor

See #2242
This commit is contained in:
Sebastian Serth
2024-04-14 18:47:45 +02:00
committed by Sebastian Serth
parent b37e1b19c3
commit 545dcd0b92
2 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,16 @@ const envConfig = module.exports = {
filename: 'icons/[hash].svg'
},
},
// Extract ToastUi's inline PNGs to actual resources, similar to Bootstrap's SVGs.
// This removes the requirement for `data:` URLs in our CSP
{
mimetype: 'image/png',
scheme: 'data',
type: 'asset/resource',
generator: {
filename: 'icons/[hash].png'
},
},
erb
]
},