mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Merge pull request #1394 from hedgedoc/remove-cdn
This commit is contained in:
commit
957d7d553e
23 changed files with 70 additions and 244 deletions
|
@ -26,12 +26,6 @@ const defaultDirectives = {
|
|||
mediaSrc: ['*']
|
||||
}
|
||||
|
||||
const cdnDirectives = {
|
||||
scriptSrc: ['https://cdnjs.cloudflare.com', 'https://cdn.mathjax.org'],
|
||||
styleSrc: ['https://cdnjs.cloudflare.com', 'https://fonts.googleapis.com'],
|
||||
fontSrc: ['https://cdnjs.cloudflare.com', 'https://fonts.gstatic.com']
|
||||
}
|
||||
|
||||
const disqusDirectives = {
|
||||
scriptSrc: ['https://disqus.com', 'https://*.disqus.com', 'https://*.disquscdn.com'],
|
||||
styleSrc: ['https://*.disquscdn.com'],
|
||||
|
@ -59,7 +53,6 @@ CspStrategy.computeDirectives = function () {
|
|||
const directives = {}
|
||||
mergeDirectives(directives, config.csp.directives)
|
||||
mergeDirectivesIf(config.csp.addDefaults, directives, defaultDirectives)
|
||||
mergeDirectivesIf(config.useCDN, directives, cdnDirectives)
|
||||
mergeDirectivesIf(config.csp.addDisqus, directives, disqusDirectives)
|
||||
mergeDirectivesIf(config.csp.addGoogleAnalytics, directives, googleAnalyticsDirectives)
|
||||
mergeDirectivesIf(config.dropbox.appKey, directives, dropboxDirectives)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue