Remove cdn support

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-06-17 21:07:04 +02:00 committed by David Mehren
parent 3175fe18b2
commit 9498ee6bfe
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
16 changed files with 0 additions and 199 deletions

View file

@ -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