feat: SW-162 Updated redirect to rewrite reducing unnecessary redirects for user

This commit is contained in:
Hrishikesh Vaipurkar
2024-07-19 13:15:56 +02:00
parent 767f5b5d2e
commit e264e4d2e2
5 changed files with 19 additions and 108 deletions
+1 -6
View File
@@ -1,7 +1,7 @@
import createJiti from "jiti"
import { fileURLToPath } from "url"
import { login, logout, mfaLogin } from "./constants/routes/handleAuth.js"
import { login, logout } from "./constants/routes/handleAuth.js"
import { hotelReservation } from "./constants/routes/hotelReservation.js"
import { myPages } from "./constants/routes/myPages.js"
@@ -80,11 +80,6 @@ const nextConfig = {
{ source: logout.fi, destination: "/fi/logout" },
{ source: logout.no, destination: "/no/logout" },
{ source: logout.sv, destination: "/sv/logout" },
{ source: mfaLogin.da, destination: "/da/mfa-login" },
{ source: mfaLogin.de, destination: "/de/mfa-login" },
{ source: mfaLogin.fi, destination: "/fi/mfa-login" },
{ source: mfaLogin.no, destination: "/no/mfa-login" },
{ source: mfaLogin.sv, destination: "/sv/mfa-login" },
{
source: `${myPages.en}/:path*`,
destination: `/en/my-pages/:path*`,