로그인 처리
iipbs_sn / build (push) Waiting to run

This commit is contained in:
yschoi
2025-05-26 10:32:26 +09:00
parent 6156cf6419
commit d975e8fed0
14 changed files with 494 additions and 262 deletions
+18 -1
View File
@@ -46,9 +46,26 @@ export function middleware(req: NextRequest) {
});
}
if (pathname.startsWith("/user-service")) {
const requestHeaders = new Headers(req.headers);
const newUrl = `${serverApiUrl}${pathname}`;
console.log(
`[Middleware] Rewriting from '/user-service' path to: ${newUrl}`,
);
return NextResponse.rewrite(new URL(newUrl), {
headers: requestHeaders,
});
}
return NextResponse.next();
}
export const config = {
matcher: ["/server/:path*","/geoserver/:path*", "/attach-service/:path*"],
matcher: [
"/server/:path*",
"/geoserver/:path*",
"/attach-service/:path*",
"/user-service/:path*",
],
};