diff --git a/next.config.mjs b/next.config.mjs index 1bab46a..c4247d2 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -9,6 +9,23 @@ const nextConfig = { env: { version: packageJson.version, }, + // Minigame routes moved under /minigames/* (source + URLs). Keep old URLs + // working for bookmarks and stale links; temporary (307/308) so they stay + // easy to change during active development. Next 16 requires `permanent` + // to be set explicitly on every entry. + async redirects() { + return [ + { source: "/qualification", destination: "/minigames/qualification", permanent: false }, + { source: "/radio", destination: "/minigames/radio", permanent: false }, + { source: "/radio/custom", destination: "/minigames/radio/custom", permanent: false }, + { source: "/radio/custom/:id", destination: "/minigames/radio/custom/:id", permanent: false }, + { source: "/eod", destination: "/minigames/eod", permanent: false }, + { source: "/eod/custom", destination: "/minigames/eod/custom", permanent: false }, + { source: "/eod/custom/:id", destination: "/minigames/eod/custom/:id", permanent: false }, + { source: "/flappy", destination: "/minigames/flappy", permanent: false }, + { source: "/opord", destination: "/minigames/opord", permanent: false }, + ]; + }, // Server Actions default to a 1 MB request body limit, which would reject // most image uploads. Bump it so wiki image uploads (capped at 8 MB in the // uploadWikiImage action) pass through with room for multipart overhead.