generated from rakenduste-programmeerimine-2024/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
38 lines (37 loc) · 1.08 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true, // Helps identify potential issues in React components
env: {
JWT_SECRET: process.env.JWT_SECRET, // Exposes environment variables to the app
NEXT_PUBLIC_SUPABASE_URL: process.env.NEXT_PUBLIC_SUPABASE_URL,
NEXT_PUBLIC_SUPABASE_ANON_KEY: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
NEXT_PUBLIC_IS_PRODUCTION: process.env.NEXT_PUBLIC_IS_PRODUCTION,
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**", // Wildcard to allow all domains temporarily
pathname: "**",
},
],
},
async headers() {
return [
{
source: "/api/:path*", // Apply headers to all API routes
headers: [
{
key: "Cache-Control",
value: "no-store", // Ensures sensitive data is not cached
},
{
key: "Content-Security-Policy",
value: "default-src 'self';", // Example CSP header, adjust as needed
},
],
},
]
},
}
module.exports = nextConfig