-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
83 lines (81 loc) · 2.02 KB
/
next.config.ts
File metadata and controls
83 lines (81 loc) · 2.02 KB
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
import type { NextConfig } from "next";
import path from "path";
const nextConfig: NextConfig = {
reactStrictMode: true,
transpilePackages: ["next-mdx-remote"],
allowedDevOrigins: ["chanhdai-macbook.local"],
turbopack: {
root: path.join(__dirname, "."),
},
devIndicators: false,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "assets.chanhdai.com",
port: "",
},
{
protocol: "https",
hostname: "images.unsplash.com",
port: "",
},
],
qualities: [75, 100],
},
async redirects() {
return [
{
source:
"/:section(blog|components)/writing-effect-inspired-by-apple:extension(.mdx)?",
destination: "/:section/apple-hello-effect:extension",
permanent: true,
},
];
},
async rewrites() {
return [
{
source: "/blog/:slug.mdx",
destination: "/blog.mdx/:slug",
},
{
source: "/components/:slug.mdx",
destination: "/blog.mdx/:slug",
},
{
source: "/rss",
destination: "/blog/rss",
},
{
source: "/registry/rss",
destination: "/components/rss",
},
];
},
// async headers() {
// return [
// {
// source: "/(.*)",
// headers: [
// {
// // Prevents MIME type sniffing, reducing the risk of malicious file uploads
// key: "X-Content-Type-Options",
// value: "nosniff",
// },
// {
// // Protects against clickjacking attacks by preventing your site from being embedded in iframes.
// key: "X-Frame-Options",
// value: "DENY",
// },
// {
// // Controls how much referrer information is included with requests, balancing security and functionality.
// key: "Referrer-Policy",
// value: "strict-origin-when-cross-origin",
// },
// ],
// },
// ];
// },
};
export default nextConfig;