We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6d97b28 + 78cf07d commit c4e535fCopy full SHA for c4e535f
website/next.config.js
@@ -1,6 +1,33 @@
1
/** @type {import('next').NextConfig} */
2
+
3
+const cspHeader = `
4
+ default-src 'self' ${process.env.NEXT_PUBLIC_SUPABASE_URL};
5
+ style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com/ https://fonts.google.com/;
6
+ img-src 'self' data: ${process.env.NEXT_PUBLIC_SUPABASE_URL}/storage/;
7
+ object-src 'none';
8
+ base-uri 'none';
9
+ frame-ancestors 'none';
10
+`
11
12
const nextConfig = {
13
reactStrictMode: true,
14
+ async headers() {
15
+ return [
16
+ {
17
+ source: '/(.*)',
18
+ headers: [
19
20
+ key: 'Content-Security-Policy',
21
+ value: cspHeader.replace(/\n/g, ''),
22
+ },
23
24
+ key: 'X-Frame-Options',
25
+ value: 'SAMEORIGIN',
26
27
+ ],
28
29
+ ]
30
31
}
32
33
module.exports = nextConfig
0 commit comments