an app to share curated trails
sidetrail.app
atproto
nextjs
react
rsc
1module.exports = {
2 cacheComponents: true,
3 cacheHandlers: {
4 redis: require.resolve("./cache/handlers/redis.js"),
5 },
6 allowedDevOrigins: ["127.0.0.1"],
7 experimental: {
8 viewTransition: true,
9 },
10 async rewrites() {
11 return [
12 {
13 source: "/@:handle/:path*",
14 destination: "/at/:handle/:path*",
15 },
16 {
17 source: "/@:handle",
18 destination: "/at/:handle",
19 },
20 ];
21 },
22 async headers() {
23 return [
24 {
25 source: "/:path*.(png|jpg|jpeg|ico|svg|webp)",
26 headers: [
27 {
28 key: "Cache-Control",
29 value: "public, max-age=86400, stale-while-revalidate=604800",
30 },
31 ],
32 },
33 ];
34 },
35};