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:
@@ -12,6 +12,7 @@ import * as currentWebLogout from "@/middlewares/currentWebLogout"
|
|||||||
import * as dateFormat from "@/middlewares/dateFormat"
|
import * as dateFormat from "@/middlewares/dateFormat"
|
||||||
import * as handleAuth from "@/middlewares/handleAuth"
|
import * as handleAuth from "@/middlewares/handleAuth"
|
||||||
import * as myPages from "@/middlewares/myPages"
|
import * as myPages from "@/middlewares/myPages"
|
||||||
|
import * as redirect from "@/middlewares/redirect"
|
||||||
import * as sasXScandic from "@/middlewares/sasXScandic"
|
import * as sasXScandic from "@/middlewares/sasXScandic"
|
||||||
import { getDefaultRequestHeaders } from "@/middlewares/utils"
|
import { getDefaultRequestHeaders } from "@/middlewares/utils"
|
||||||
import * as webView from "@/middlewares/webView"
|
import * as webView from "@/middlewares/webView"
|
||||||
@@ -58,7 +59,7 @@ export const middleware: NextMiddleware = async (request, event) => {
|
|||||||
bookingFlow,
|
bookingFlow,
|
||||||
sasXScandic,
|
sasXScandic,
|
||||||
cmsContent,
|
cmsContent,
|
||||||
//redirect,
|
redirect,
|
||||||
]
|
]
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ export const middleware: NextMiddleware = async (request) => {
|
|||||||
headers,
|
headers,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NextResponse.next({ headers })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Redirect error: ", e)
|
console.error("Redirect error: ", e)
|
||||||
throw notFound()
|
throw notFound()
|
||||||
|
|||||||
Reference in New Issue
Block a user