Merge pull request #1369 from hedgedoc/feature/remove_unsafe_eval

This commit is contained in:
Yannick Bungers 2021-06-08 22:16:07 +02:00 committed by GitHub
commit 1d082ae827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -5,8 +5,7 @@ const CspStrategy = {}
const defaultDirectives = {
defaultSrc: ['\'self\''],
scriptSrc: ['\'self\'', 'vimeo.com', 'https://gist.github.com', 'www.slideshare.net', '\'unsafe-eval\''],
// ^ TODO: Remove unsafe-eval - webpack script-loader issues https://github.com/hackmdio/codimd/issues/594
scriptSrc: ['\'self\'', 'vimeo.com', 'https://gist.github.com', 'www.slideshare.net'],
imgSrc: ['*'],
styleSrc: ['\'self\'', '\'unsafe-inline\'', 'https://github.githubassets.com'], // unsafe-inline is required for some libs, plus used in views
fontSrc: ['\'self\'', 'data:', 'https://public.slidesharecdn.com'],

View file

@ -6,9 +6,9 @@ module.exports = [
// merge common config
merge(common, {
mode: 'development',
devtool: 'eval-cheap-module-source-map'
devtool: 'cheap-module-source-map'
}),
merge(htmlexport, {
mode: 'development',
devtool: 'eval-cheap-module-source-map'
devtool: 'cheap-module-source-map'
})]