From 28992120403b9e26b0335f4ca9b3d1964f6f564c Mon Sep 17 00:00:00 2001 From: dojineko Date: Thu, 1 Feb 2018 21:20:44 +0900 Subject: [PATCH] update test --- test/basic.ssr.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/basic.ssr.test.js b/test/basic.ssr.test.js index 45d0d230fc..560e8d7779 100755 --- a/test/basic.ssr.test.js +++ b/test/basic.ssr.test.js @@ -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'))