Merged in fix/redirect-content-types (pull request #1855)

Fix/redirect content types

* feat(SW-2429): Removed [contentType]>[uid] and use app router based structure for content types

* feat(SW-2429): Added breadcrumbs to follow contenttype folder structure

* fix(SW-2112): reenabling redirect middleware since working with new content-type routing strategy


Approved-by: Michael Zetterberg
This commit is contained in:
Arvid Norlin
2025-04-28 07:02:15 +00:00
parent 5c189da123
commit 6cf01e8990
2 changed files with 4 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import * as currentWebLogout from "@/middlewares/currentWebLogout"
import * as dateFormat from "@/middlewares/dateFormat"
import * as handleAuth from "@/middlewares/handleAuth"
import * as myPages from "@/middlewares/myPages"
import * as redirect from "@/middlewares/redirect"
import * as sasXScandic from "@/middlewares/sasXScandic"
import { getDefaultRequestHeaders } from "@/middlewares/utils"
import * as webView from "@/middlewares/webView"
@@ -58,7 +59,7 @@ export const middleware: NextMiddleware = async (request, event) => {
bookingFlow,
sasXScandic,
cmsContent,
//redirect,
redirect,
]
try {

View File

@@ -58,6 +58,8 @@ export const middleware: NextMiddleware = async (request) => {
headers,
})
}
return NextResponse.next({ headers })
} catch (e) {
console.error("Redirect error: ", e)
throw notFound()