-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
85 lines (84 loc) · 2.07 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/** @type {import('next').NextConfig} */
// const securityHeaders = require('./headers.js');
const securityHeaders = require('./headers')
module.exports = {
images: {
unoptimized: true,
remotePatterns: [
{
protocol: "https",
hostname: "**.ipfs.w3s.link",
},
{
protocol: "https",
hostname: "cdn.stamp.fyi",
pathname: "/avatar/**",
},
{
protocol: "https",
hostname: "i.picsum.photos",
pathname: "/id/**",
},
{
protocol: "https",
hostname: "plg-whisperchain-xyz.s3.amazonaws.com",
pathname: "/stability/**",
},
{
protocol: "https",
hostname: "whisperchain-staging-assests.s3.amazonaws.com",
pathname: "/stability/**",
},
{
protocol: "https",
hostname: "whisperchain-prod-assests.s3.amazonaws.com",
pathname: "/stability/**",
},
{
protocol: "https",
hostname:
"whisperchain-staging-static-files.s3.us-east-2.amazonaws.com",
},
{
protocol: "https",
hostname:
"whisperchain-prod-static-files.s3.amazonaws.com",
},
{
protocol: "https",
hostname: "static.staging.whisperchain.xyz",
},
{
protocol: "https",
hostname: "static.whisperchain.xyz",
},
],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048],
path: process.env.W_CDN_IMAGE_RESIZER_URL,
},
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: '/:path*',
headers: securityHeaders
}
];
},
// async rewrites() {
// return [
// {
// source: '/api/:path*',
// destination: 'https://api.staging.whisperchain.xyz/api/:path*' // Proxy to Backend
// }
// ]
// },
compiler: {
// Enables the styled-components SWC transform
styledComponents: true,
},
env: {
/* WARNING!!! THESE ARE ACCESSABLE IN FRONTEND CODE! BE-AWARE */
W_DOMAIN: process.env.W_DOMAIN,
},
};