-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
39 lines (37 loc) · 916 Bytes
/
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
const withPWA = require("next-pwa");
const securityHeaders = [
{
key: "X-DNS-Prefetch-Control",
value: "on",
},
{
key: "X-Frame-Options",
value: "SAMEORIGIN",
},
{
key: "Content-Security-Policy",
value:
"default-src 'self' 'unsafe-inline' 'unsafe-eval' fonts.googleapis.com; img-src 'self' data:; font-src 'self' data: fonts.gstatic.com; connect-src 'self' fonts.gstatic.com vitals.vercel-insights.com",
},
];
module.exports = withPWA({
pwa: {
dest: "public",
disable: process.env.NODE_ENV === 'development',
register: true,
},
images: {
dangerouslyAllowSVG: true,
domains: ["mirrors.creativecommons.org"],
formats: ['image/avif', 'image/webp'],
},
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: "/(.*)",
headers: securityHeaders,
},
];
},
});