Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improve Application Security #1889

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: Updated headers
  • Loading branch information
adintegra committed Dec 5, 2024
commit 3b1c14c3fb1ca52fa48cdff79af8e4ddd53fe961
11 changes: 6 additions & 5 deletions app/next.config.js
Original file line number Diff line number Diff line change
@@ -50,14 +50,15 @@ module.exports = withPreconstruct(
{
key: "Content-Security-Policy",
value: [
`default-src 'self' 'unsafe-inline'${process.env.NODE_ENV === "development" ? ` 'unsafe-eval'` : ""}`,
`default-src 'self' 'unsafe-inline'${process.env.NODE_ENV === "development" ? " unsafe-eval" : ""}`,
`script-src 'self' 'unsafe-inline'${process.env.NODE_ENV === "development" ? " http://localhost:3000" : ""} https://*.sentry.io https://vercel.live/ https://vercel.com`,
`style-src 'self' 'unsafe-inline'`,
`font-src 'self'`,
`form-action 'self'`,
`connect-src 'self' ${process.env.NODE_ENV === "development" ? "http://localhost:3000" : ""} https//*.sentry.io https://*.vercel.app`,
`img-src 'self' blob: data: ${process.env.NODE_ENV === "development" ? "http://localhost:3000" : ""} https://visualize.admin.ch`,
`script-src-elem 'self' 'unsafe-inline' https://visualize.admin.ch https://*.vercel.live`,
`worker-src 'self' blob: https://visualize.admin.ch`,
`connect-src 'self'${process.env.NODE_ENV === "development" ? " http://localhost:3000" : ""} https//*.sentry.io https://*.vercel.app`,
`img-src 'self' https://vercel.live https://vercel.com *.pusher.com *.pusherapp.com https://*.admin.ch https://*.opendataswiss.org${process.env.NODE_ENV === "development" ? " http://localhost:3000" : ""} data: blob:`,
`script-src-elem 'self' 'unsafe-inline' https://*.admin.ch https://vercel.live https://vercel.com`,
`worker-src 'self' blob: https://*.admin.ch`,
].join("; "),
},
],
Loading