fix: toggle section accordion open
This commit is contained in:
@@ -14,19 +14,8 @@ import type { MiddlewareMatcher } from "@/types/middleware"
|
||||
|
||||
export const middleware: NextMiddleware = async (request) => {
|
||||
const { nextUrl } = request
|
||||
const lang = findLang(nextUrl.pathname)!
|
||||
|
||||
const pathWithoutTrailingSlash = removeTrailingSlash(nextUrl.pathname)
|
||||
const pathNameWithoutLang = pathWithoutTrailingSlash.replace(`/${lang}`, "")
|
||||
const { contentType, uid } = await resolveEntry(pathNameWithoutLang, lang)
|
||||
|
||||
const headers = getDefaultRequestHeaders(request)
|
||||
if (uid) {
|
||||
headers.set("x-uid", uid)
|
||||
}
|
||||
if (contentType) {
|
||||
headers.set("x-contenttype", contentType)
|
||||
}
|
||||
return NextResponse.next({
|
||||
request: {
|
||||
headers,
|
||||
|
||||
Reference in New Issue
Block a user