-
Notifications
You must be signed in to change notification settings - Fork 31
/
next.config.js
73 lines (71 loc) · 1.37 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
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
/** @type {import('next').NextConfig} */
const securityHeaders = [
{
key: "X-DNS-Prefetch-Control",
value: "on",
},
];
module.exports = {
i18n: {
locales: ["en"],
defaultLocale: "en",
},
reactStrictMode: true,
images: {
domains: [
"stuyspec-images.s3.amazonaws.com",
"stuyspec-media.s3.amazonaws.com",
"image.isu.pub",
"cdn.discordapp.com",
],
unoptimized: true,
},
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: "/(.*)",
headers: securityHeaders,
},
{
source: "/dash",
headers: [
{
key: "Cache-Control",
value: "no-store",
},
],
},
];
},
async redirects() {
return [
{
source: "/apply/web",
destination: "https://docs.google.com/forms/d/e/1FAIpQLSdJw8R4-bw5xjWG9P3Ld1WY4ZEg_L3cyhFzYJgB_a7SJtJAsA/viewform?usp=sf_link",
permanent: true,
},
{
source: "/department/ae/sing",
destination: "/department/ae/sing!",
permanent: true
},
];
},
async rewrites() {
return {
fallback: [
{
// Redirect old site links with one subdeps to article link
source: "/:department/:slug",
destination: `/article/:slug`,
},
{
// Redirect old site links with two subdeps to article link
source: "/:department/:sub_section/:slug",
destination: `/article/:slug`,
},
],
};
},
};