-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
59 lines (56 loc) · 1.76 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import remarkGfm from "remark-gfm";
import createMDX from "@next/mdx";
import nextSafe from "next-safe";
const isDev = process.env.NODE_ENV !== "production";
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "is3.cloudhost.id",
port: "",
},
{
protocol: "http",
hostname: "sawocangkring-wonoayu.desa.id",
port: "",
},
],
},
// Configure `pageExtensions`` to include MDX files
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
// Optionally, add any other Next.js config below
async headers() {
return [
{
source: "/(.*)",
headers: nextSafe({
contentSecurityPolicy: {
"script-src":
"'self' 'unsafe-eval' 'unsafe-inline' *.googletagmanager.com cdn.jsdelivr.net *.youtube.com *.tableau.com",
"frame-src":
"'self' *.googletagmanager.com *.youtube.com *.google.com *.tableau.com *.openstreetmap.org",
"style-src":
"'self' 'unsafe-inline' fonts.googleapis.com cdn.jsdelivr.net",
"connect-src":
"'self' *.googletagmanager.com *.google-analytics.com sid.kemendesa.go.id",
"img-src":
"'self' data: http://sawocangkring-wonoayu.desa.id *.ytimg.com *.tableau.com is3.cloudhost.id *.tile.openstreetmap.org *.bmkg.go.id",
"frame-ancestors": "'self' *.kemendesa.go.id",
},
frameoptions: false,
}),
},
];
},
};
const withMDX = createMDX({
// Add markdown plugins here, as desired
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [],
},
});
// Merge MDX config with Next.js config
export default withMDX(nextConfig);