-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.js
55 lines (51 loc) · 1.24 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const securityHeaders = [
{
key: "X-Frame-Options",
value: "ALLOW-FROM http://*.metabase.com",
},
{
key: "Content-Security-Policy",
value:
"frame-ancestors 'self' http://*.metabase.com http://metabase.com http://*.metabaseapp.com http://metabaseapp.com",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "Referrer-Policy",
value: "no-referrer-when-downgrade",
},
];
module.exports = withBundleAnalyzer({
experimental: {
// styledComponents: true,
externalDir: true,
},
outputFileTracing: false,
swcMinify: true,
poweredByHeader: false,
reactStrictMode: true,
env: {
ENV: process.env.ENV,
METABASE_APP_ID: process.env.METABASE_APP_ID,
METABASE_APP_DOMAIN: process.env.METABASE_APP_DOMAIN,
METABASE_APP_PORT: process.env.METABASE_APP_PORT,
METABASE_JWT_SHARED_SECRET: process.env.METABASE_JWT_SHARED_SECRET,
},
async headers() {
return [
{
// Apply headers to all routes
source: "/(.*)?",
headers: securityHeaders,
},
];
},
images: {
domains: ["localhost:3003", "*.metabase.com"],
},
});