mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
Remove cdn support
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
3175fe18b2
commit
9498ee6bfe
16 changed files with 0 additions and 199 deletions
16
test/csp.js
16
test/csp.js
|
@ -27,7 +27,6 @@ describe('Content security policies', function () {
|
|||
upgradeInsecureRequests: 'auto',
|
||||
reportURI: undefined
|
||||
},
|
||||
useCDN: true,
|
||||
dropbox: {
|
||||
appKey: undefined
|
||||
}
|
||||
|
@ -44,21 +43,6 @@ describe('Content security policies', function () {
|
|||
csp = mock.reRequire('../lib/csp')
|
||||
})
|
||||
|
||||
// beginnging Tests
|
||||
it('Disable CDN', function () {
|
||||
const testconfig = defaultConfig
|
||||
testconfig.useCDN = false
|
||||
mock('../lib/config', testconfig)
|
||||
csp = mock.reRequire('../lib/csp')
|
||||
|
||||
assert(!csp.computeDirectives().scriptSrc.includes('https://cdnjs.cloudflare.com'))
|
||||
assert(!csp.computeDirectives().scriptSrc.includes('https://cdn.mathjax.org'))
|
||||
assert(!csp.computeDirectives().styleSrc.includes('https://cdnjs.cloudflare.com'))
|
||||
assert(!csp.computeDirectives().styleSrc.includes('https://fonts.googleapis.com'))
|
||||
assert(!csp.computeDirectives().fontSrc.includes('https://cdnjs.cloudflare.com'))
|
||||
assert(!csp.computeDirectives().fontSrc.includes('https://fonts.gstatic.com'))
|
||||
})
|
||||
|
||||
it('Disable Google Analytics', function () {
|
||||
const testconfig = defaultConfig
|
||||
testconfig.csp.addGoogleAnalytics = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue