-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathnext.config.mjs
44 lines (42 loc) · 890 Bytes
/
next.config.mjs
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
/**
* @type {import('next').Config}
*/
import withSerwistInit from "@serwist/next";
const withSerwist = withSerwistInit({
// Note: This is only an example. If you use Pages Router,
// use something else that works, such as "service-worker/index.ts".
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
export default withSerwist({
reactStrictMode: true,
serverRuntimeConfig: {
runtime: "edge"
},
images: {
dangerouslyAllowSVG: true,
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
async headers() {
return [
{
source: '/',
headers: [
{
key: 'Cross-Origin-Embedder-Policy',
value: 'require-corp',
},
{
key: 'Cross-Origin-Opener-Policy',
value: 'same-origin',
},
],
},
];
},
});