mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-03 19:07:15 +00:00
update test
This commit is contained in:
parent
4fb644fdb3
commit
2899212040
@ -26,7 +26,10 @@ test.serial('Init Nuxt.js', async t => {
|
||||
render: {
|
||||
csp: {
|
||||
enabled: true,
|
||||
allowedSources: ['https://example.com', 'https://example.io']
|
||||
policies: {
|
||||
'default-src': [`'none'`],
|
||||
'script-src': ['https://example.com', 'https://example.io']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -258,6 +261,7 @@ test('Content-Security-Policy Header', async t => {
|
||||
resolveWithFullResponse: true
|
||||
})
|
||||
// Verify functionality
|
||||
t.regex(headers['content-security-policy'], /default-src 'none'/)
|
||||
t.regex(headers['content-security-policy'], /script-src 'self' 'sha256-.*'/)
|
||||
t.true(headers['content-security-policy'].includes('https://example.com'))
|
||||
t.true(headers['content-security-policy'].includes('https://example.io'))
|
||||
|
Loading…
Reference in New Issue
Block a user