Skip to content

Commit 661b0aa

Browse files
authored
Merge pull request #99 from GDGoCINHA/ThinkMuk-patch-1
Fix to correct api url in route.js
2 parents c03f246 + 728c177 commit 661b0aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/api/auth/[route]/route.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const API_BASE_URL = 'https://gdgocinha.com/api/auth'; // 프록시 대상 주
66

77
export async function POST(req, { params }) {
88
const action = params.action; // 'refresh' or 'logout'
9-
const targetUrl = `${API_BASE_URL}/${action}`;
9+
const targetUrl = `${API_BASE_URL.replace(/\/$/, '')}/${action.replace(/^\//, '')}`;
1010

1111
try {
1212
const cookies = req.headers.get('cookie') || '';
@@ -51,4 +51,4 @@ export async function POST(req, { params }) {
5151
{ status: error.response?.status || 500 }
5252
);
5353
}
54-
}
54+
}

0 commit comments

Comments
 (0)