Repository navigation
Expand file tree
/
Copy pathnext.config.mjs
More file actions
69 lines (65 loc) · 1.61 KB
/
Copy pathnext.config.mjs
File metadata and controls
69 lines (65 loc) · 1.61 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
import createNextIntlPlugin from "next-intl/plugin";
const withNextIntl = createNextIntlPlugin("./i18n/request.ts");
const permanentRedirects = [
["/community-charter", "/about/charter"],
["/sponsors", "/about/sponsors"],
["/partners", "/about/partners"],
["/coc", "/about/coc"],
["/support", "/support/support-providers"],
["/merch", "/contribute/shop"],
["/cloud-images", "/download"],
["/alternative-images", "/download"],
["/licensing", "/legal/licensing"],
["/privacy-policy", "/legal/privacy"],
["/trademark", "/legal/trademarks"],
[
"/news/2024-07-01-rocky-linux-9-cve-2024-6378-regression",
"/news/2024-07-01-openssh-sigalrm-regression",
],
["/keys", "/resources/gpg-key-info"],
["/security.txt", "/.well-known/security.txt"],
];
/** @type {import('next').NextConfig} */
const nextConfig = {
typedRoutes: true,
allowedDevOrigins: ["localhost", "127.0.0.1"],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "www.rockylinux.org",
},
{
protocol: "https",
hostname: "rockylinux.org",
},
],
},
async headers() {
return [
{
source: "/:path*",
has: [
{
type: "host",
value: "staging.rockylinux.org",
},
],
headers: [
{
key: "X-Robots-Tag",
value: "noindex",
},
],
},
];
},
async redirects() {
return permanentRedirects.map(([source, destination]) => ({
source,
destination,
permanent: true,
}));
},
};
export default withNextIntl(nextConfig);