From 7a90c6bc3cf27ad72a6ce01eaf59f5f9d8082a21 Mon Sep 17 00:00:00 2001 From: carolineBda Date: Thu, 17 Feb 2022 07:52:02 +0100 Subject: [PATCH] =?UTF-8?q?fix(video):=20update=20csp=20rule=20to=20fix=20?= =?UTF-8?q?vid=C3=A9o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 21 +++++++++++---------- src/pages/mentions-legales.tsx | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/next.config.js b/next.config.js index f14bce24..5e34cf87 100644 --- a/next.config.js +++ b/next.config.js @@ -1,11 +1,11 @@ const nextSourceMaps = require("@zeit/next-source-maps"); -const { withSentryConfig } = require("@sentry/nextjs"); +const {withSentryConfig} = require("@sentry/nextjs"); const csp = { - 'default-src': ["'none'"], + 'default-src': ["'self'"], 'connect-src': ["'self'", "https://*.gouv.fr", "https://services.sarbacane.com"], 'font-src': ["'self'", "data:"], - 'img-src': ["'self'", "data:", "https://forms.sbc08.com", 'https://*.tile.openstreetmap.org/'], + 'img-src': ["'self'", "data:", "https://forms.sbc08.com", 'https://*.tile.openstreetmap.org/'], 'prefetch-src': ["'self'", "https://*.gouv.fr"], 'script-src': ["'self'", "https://*.gouv.fr", "https://*.sbc08.com"], 'frame-src': ["'self'", "https://*.gouv.fr"], @@ -25,14 +25,14 @@ module.exports = withSentryConfig( disableClientWebpackPlugin: true, disableServerWebpackPlugin: true, }, - webpack: (config, { isServer /*, buildId */ }) => { + webpack: (config, {isServer /*, buildId */}) => { if (!isServer) { config.resolve.alias["@sentry/node"] = "@sentry/browser"; - config.resolve.fallback = { + config.resolve.fallback = { fs: false, path: false, os: false, - }; + }; } return config; }, @@ -41,10 +41,11 @@ module.exports = withSentryConfig( { source: '/:path*', headers: [{ - key: "Content-Security-Policy", - value: Object.keys(csp).map(key => `${key} ${csp[key].join(" ")}`).join(";") - }], + key: "Content-Security-Policy", + value: Object.keys(csp).map(key => `${key} ${csp[key].join(" ")}`).join(";") + }], }, ] - }, }) + }, + }) ); diff --git a/src/pages/mentions-legales.tsx b/src/pages/mentions-legales.tsx index c8be9040..10d53bf7 100644 --- a/src/pages/mentions-legales.tsx +++ b/src/pages/mentions-legales.tsx @@ -11,7 +11,7 @@ const Page = () => {

Mentions légales

-

Éditeur de la Plateforme

+

Éditeur

Ce site est édité par la Direction de la Sécurité Sociale: