diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 9df3c65268..75c9ae855f 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -264,6 +264,29 @@ const nextConfig = { }, async rewrites() { const beforeFiles = [ + { + source: "/forms/:formQuery*", + destination: "/apps/routing-forms/routing-link/:formQuery*", + }, + { + source: "/router", + destination: "/apps/routing-forms/router", + }, + { + source: "/success/:path*", + has: [ + { + type: "query", + key: "uid", + value: "(?.*)", + }, + ], + destination: "/booking/:uid/:path*", + }, + { + source: "/cancel/:path*", + destination: "/booking/:path*", + }, { /** * Needed due to the introduction of dotted usernames @@ -327,29 +350,6 @@ const nextConfig = { source: "/:user/avatar.png", destination: "/api/user/avatar?username=:user", }, - { - source: "/forms/:formQuery*", - destination: "/apps/routing-forms/routing-link/:formQuery*", - }, - { - source: "/router", - destination: "/apps/routing-forms/router", - }, - { - source: "/success/:path*", - has: [ - { - type: "query", - key: "uid", - value: "(?.*)", - }, - ], - destination: "/booking/:uid/:path*", - }, - { - source: "/cancel/:path*", - destination: "/booking/:path*", - }, ], /* TODO: have these files being served from another deployment or CDN {