-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathnext.config.ts
More file actions
65 lines (62 loc) · 1.4 KB
/
next.config.ts
File metadata and controls
65 lines (62 loc) · 1.4 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
// next.config.ts
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
allowedDevOrigins: ["airbroke-dev.icorete.ch", "127.0.0.1"],
serverExternalPackages: ["@airbrake/node", "@sentry/node"],
typedRoutes: true,
reactCompiler: true,
cacheComponents: true,
devIndicators: false,
poweredByHeader: false,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "www.gravatar.com",
},
{
protocol: "https",
hostname: "i.imgur.com",
},
],
},
logging: {
fetches: {
fullUrl: true,
},
},
async rewrites() {
return [
{
source: "/api/v3/projects/:project_id/create-notice",
destination: "/api/v3/notices",
},
{
source: "/api/v3/projects/:project_id/notices",
destination: "/api/v3/notices",
},
{
source: "/notifier_api/v2/notices",
destination: "/api/v3/notices",
},
];
},
async redirects() {
return [
// compat
{
source:
"/projects/:project_id/notices/:notice_id/occurrences/:occurrence_id",
destination: "/occurrences/:occurrence_id",
permanent: true,
},
{
source: "/projects/:project_id/notices/:notice_id",
destination: "/notices/:notice_id",
permanent: true,
},
];
},
};
export default nextConfig;