From 26bd02bd9409123f50f3501471738da66554f558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Wed, 22 May 2024 12:14:08 -0700 Subject: [PATCH] chore: Moved legacy rewrites from afterFiles to beforeFiles (#15164) --- apps/web/next.config.js | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) 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 {