From 0c024ba68a9a438e7453f548c0ccc85bfa7bb67d Mon Sep 17 00:00:00 2001 From: Carlos Villuendas Zambrana Date: Thu, 19 Oct 2023 11:01:29 +0200 Subject: [PATCH 1/2] feat(packages/sui-ssr): revert csp report --- packages/sui-ssr/server/middlewares/ssr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sui-ssr/server/middlewares/ssr.js b/packages/sui-ssr/server/middlewares/ssr.js index 4c77007f5..24ecd3c6d 100644 --- a/packages/sui-ssr/server/middlewares/ssr.js +++ b/packages/sui-ssr/server/middlewares/ssr.js @@ -208,8 +208,8 @@ export default async (req, res, next) => { 'Server-Timing': formatServerTimingHeader({ ...performance, ...ssrPerformance - }), - 'Content-Security-Policy-Report-Only': `default-src 'self'; report-uri ${CSP_REPORT_PATH}` + }) + // 'Content-Security-Policy-Report-Only': `default-src 'self'; report-uri ${CSP_REPORT_PATH}` }) res.write(HtmlBuilder.buildHead({headTplPart, headString, htmlAttributes})) res.flush() From 7ddc4e551c43dab1428cebc206f579ca4f50d741 Mon Sep 17 00:00:00 2001 From: Carlos Villuendas Zambrana Date: Thu, 19 Oct 2023 11:06:00 +0200 Subject: [PATCH 2/2] refactor(packages/sui-ssr): fix linter --- packages/sui-ssr/server/middlewares/ssr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sui-ssr/server/middlewares/ssr.js b/packages/sui-ssr/server/middlewares/ssr.js index 24ecd3c6d..37676ccc1 100644 --- a/packages/sui-ssr/server/middlewares/ssr.js +++ b/packages/sui-ssr/server/middlewares/ssr.js @@ -37,7 +37,7 @@ try { const HEAD_OPENING_TAG = '' const HEAD_CLOSING_TAG = '' -const CSP_REPORT_PATH = '/csp-report' +// const CSP_REPORT_PATH = '/csp-report' const formatServerTimingHeader = metrics => Object.entries(metrics)