mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-19 17:27:26 +02:00
♻️ Create backend package (#643)
This commit is contained in:
parent
7fc08c6736
commit
05fe2edaea
68 changed files with 476 additions and 391 deletions
|
@ -25,8 +25,10 @@ const supportedLocales = [
|
|||
"zh",
|
||||
];
|
||||
|
||||
export function middleware({ headers, cookies, nextUrl }: NextRequest) {
|
||||
export async function middleware(req: NextRequest) {
|
||||
const { headers, cookies, nextUrl } = req;
|
||||
const newUrl = nextUrl.clone();
|
||||
const res = NextResponse.next();
|
||||
|
||||
// Check if locale is specified in cookie
|
||||
const localeCookie = cookies.get("NEXT_LOCALE");
|
||||
|
@ -50,7 +52,7 @@ export function middleware({ headers, cookies, nextUrl }: NextRequest) {
|
|||
}
|
||||
}
|
||||
|
||||
return NextResponse.next();
|
||||
return res;
|
||||
}
|
||||
|
||||
export const config = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue