middleware 원복
This commit is contained in:
@@ -130,8 +130,7 @@ export function middleware(req: NextRequest) {
|
||||
|
||||
if (pathname.startsWith("/reuse-service")) {
|
||||
const queryParams = searchParams.toString();
|
||||
const newPath = pathname.replace("/reuse-service", "");
|
||||
const newUrl = `${GATEWAY_URL}/reuse-service/api/v1${newPath}${queryParams ? `?${queryParams}` : ""}`;
|
||||
const newUrl = `${GATEWAY_URL}${pathname}${queryParams ? `?${queryParams}` : ""}`;
|
||||
console.log(`[Middleware] Rewriting from '/reuse-service' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
} else if (pathname.startsWith("/operation-service")) {
|
||||
|
||||
Reference in New Issue
Block a user