Remove cdn support
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
committed by
David Mehren
parent
3175fe18b2
commit
9498ee6bfe
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
|
||||
|
||||
Reference in New Issue
Block a user