Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
fix(video): update csp rule to fix vidéo
Browse files Browse the repository at this point in the history
  • Loading branch information
carolineBda committed Feb 17, 2022
1 parent 90d743a commit 7a90c6b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -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"],
Expand All @@ -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;
},
Expand All @@ -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(";")
}],
},
]
}, })
},
})
);
2 changes: 1 addition & 1 deletion src/pages/mentions-legales.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Page = () => {
<h1 id="mentions-legales">Mentions légales</h1>
<div>
<div className="fr-mt-3w">
<h2>Éditeur de la Plateforme</h2>
<h2>Éditeur</h2>
<p className="fr-mb-0">
Ce site est édité par la Direction de la Sécurité Sociale:
</p>
Expand Down

0 comments on commit 7a90c6b

Please sign in to comment.