From 3462113c2fa02b5bcab23b5ca612407883038f34 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 13 Dec 2018 07:58:45 -0800 Subject: [PATCH] fix: drop CSP support from the exported version (#795) [skip ci] --- README.md | 6 ++++-- bin/print-export-info.js | 20 -------------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a79744b..c379939 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,10 @@ You can export Pinafore as a static site. Run: npm run export Static files will be written to `__sapper__/export`. -Be sure to add the [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) header printed out in the console to -your server config! + +Note that this is not the recommended method, because +[CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) headers are not +currently supported for the exported version. ## Developing and testing diff --git a/bin/print-export-info.js b/bin/print-export-info.js index d83eb33..7b8800b 100644 --- a/bin/print-export-info.js +++ b/bin/print-export-info.js @@ -1,15 +1,3 @@ -const fs = require('fs') -const path = require('path') - -const checksum = require('../inline-script-checksum').checksum -const html = fs.readFileSync(path.join(__dirname, '../__sapper__/export/index.html'), 'utf8') -const nonce = html.match(/