로그인로그 수정 및 API 로그 추가, sort 데이터타입 수정정

This commit is contained in:
2025-06-27 20:38:45 +09:00
parent 70832bae82
commit 932ae3f961
16 changed files with 535 additions and 87 deletions
+7 -2
View File
@@ -7,11 +7,16 @@ const serverApiUrl =
export function middleware(req: NextRequest) {
const pathname = req.nextUrl.pathname;
const searchParams = req.nextUrl.searchParams;
if (pathname.startsWith("/server")) {
const queryParams = searchParams.toString();
const decodedParams = Array.from(searchParams.entries())
.map(([key, value]) => `${key}=${decodeURIComponent(value)}`)
.join("&");
const newUrl = `${serverApiUrl}${pathname.replace("/server", "")}${
queryParams ? `?${queryParams}` : ""
decodedParams ? `?${decodedParams}` : ""
}`;
return NextResponse.rewrite(new URL(newUrl));
}