-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
39 lines (39 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
const withPWA = require("next-pwa");
const { createSecureHeaders } = require("next-secure-headers");
module.exports = withPWA({
pwa: {
dest: "public",
register: true,
skipWaiting: true,
},
reactStrictMode: true,
async headers() {
return [
{
source: "/(.*)",
headers: createSecureHeaders({
contentSecurityPolicy: {
directives: {
defaultSrc: "'self'",
imgSrc: ["'self'", "data:", "https://api.producthunt.com/", "https://devarmyknife.hackersreboot.tech/", "https://www.netlify.com/img/global/badges/"],
styleSrc: ["'self'", "'unsafe-inline'"],
fontSrc: ["'self'", "https://fonts.googleapis.com/"],
scriptSrc: ["'self'", "https://umami-hrbt.herokuapp.com/", "'unsafe-eval'"]
},
},
forceHTTPSRedirect: [
true,
{ maxAge: 60 * 60 * 24 * 4, includeSubDomains: true },
],
referrerPolicy: "same-origin",
frameGuard: "sameorigin",
noopen: "noopen",
nosniff: "nosniff",
xssProtection: "sanitize",
referrerPolicy: "no-referrer-when-downgrade",
xFrameOptions: "sameorigin",
}),
},
];
},
});