fix: sn 커밋 롤백

This commit is contained in:
swcho
2025-10-21 15:17:19 +09:00
parent 2c30de2824
commit bc39549bcc
2 changed files with 4 additions and 15 deletions
+2 -13
View File
@@ -104,20 +104,9 @@ export function middleware(req: NextRequest) {
|| pathname.startsWith("/cms-service")
|| pathname.startsWith("/user-service")
) {
const requestHeaders = new Headers(req.headers);
const token = req.cookies.get(CLAIM_NAME)?.value;
const userId = req.cookies.get(AUTH_USER_ID)?.value;
const newUrl = `${SERVER_API_URL}${pathname}`;
if (token) requestHeaders.set(CLAIM_NAME, token);
if (userId) requestHeaders.set(AUTH_USER_ID, userId);
console.log(
`[Middleware] Rewriting from '/attach-service' path to: ${newUrl}`,
);
return NextResponse.rewrite(new URL(newUrl), {
headers: requestHeaders,
});
console.log(`[Middleware] Rewriting from '/attach-service' path to: ${newUrl}`);
return rewriteWith(newUrl, req, true);
}
if (pathname.startsWith("/dc-service")) {