fix: add headers correctly
This commit is contained in:
@@ -7,7 +7,10 @@ export function getDefaultRequestHeaders(request: NextRequest) {
|
||||
|
||||
const headers = new Headers(request.headers)
|
||||
headers.set("x-lang", lang)
|
||||
headers.set("x-pathname", request.nextUrl.pathname.replace(`/${lang}`, ""))
|
||||
headers.set(
|
||||
"x-pathname",
|
||||
request.nextUrl.pathname.replace(`/${lang}`, "").replace(`/webview`, "")
|
||||
)
|
||||
headers.set("x-url", request.nextUrl.href)
|
||||
|
||||
return headers
|
||||
|
||||
Reference in New Issue
Block a user