-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
106 lines (105 loc) · 1.87 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
const { withFaust, getWpHostname } = require('@faustwp/core')
const { createSecureHeaders } = require('next-secure-headers')
/**
* @type {import('next').NextConfig}
**/
module.exports = withFaust({
trailingSlash: true,
reactStrictMode: true,
experimental: {
typedRoutes: false,
},
images: {
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
port: '',
pathname: '/**',
},
{
protocol: 'http',
hostname: getWpHostname(),
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: getWpHostname(),
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '0.gravatar.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '1.gravatar.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '2.gravatar.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '3.gravatar.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'secure.gravatar.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'images.pexels.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
port: '',
pathname: '/**',
},
// from env
{
protocol: 'https',
hostname:
process.env.NEXT_PUBLIC_IMAGE_REMOTE_HOSTNAME_1 || '1.gravatar.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname:
process.env.NEXT_PUBLIC_IMAGE_REMOTE_HOSTNAME_2 || '1.gravatar.com',
port: '',
pathname: '/**',
},
],
},
async headers() {
return [
{
source: '/:path*',
headers: createSecureHeaders({
xssProtection: false,
frameGuard: [
'allow-from',
{ uri: process.env.NEXT_PUBLIC_WORDPRESS_URL },
],
}),
},
]
},
})