Skip to content

Commit

Permalink
Update CSP policy
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu committed Jan 8, 2025
1 parent cc5a77d commit 4ea7435
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 87 deletions.
10 changes: 9 additions & 1 deletion front/next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
const path = require("path");

const CONTENT_SECURITY_POLICIES =
`script-src 'self' 'unsafe-inline' 'unsafe-eval' www.googletagmanager.com;` +
` style-src 'self' 'unsafe-inline' *.typekit.net;` +
` connect-src 'self';` +
` form-action 'self';` +
` base-uri 'self';` +
` frame-ancestors 'self';`;

module.exports = {
transpilePackages: ["@uiw/react-textarea-code-editor"],
// As of Next 14.2.3 swc minification creates a bug in the generated client side files.
Expand Down Expand Up @@ -49,7 +57,7 @@ module.exports = {
headers: [
{
key: "Content-Security-Policy",
value: "frame-ancestors 'self'",
value: CONTENT_SECURITY_POLICIES,
},
{
key: "Strict-Transport-Security",
Expand Down
86 changes: 43 additions & 43 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 43 additions & 43 deletions viz/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4ea7435

Please sign in to comment.