We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c03f246 + 728c177 commit 661b0aaCopy full SHA for 661b0aa
src/app/api/auth/[route]/route.js
@@ -6,7 +6,7 @@ const API_BASE_URL = 'https://gdgocinha.com/api/auth'; // 프록시 대상 주
6
7
export async function POST(req, { params }) {
8
const action = params.action; // 'refresh' or 'logout'
9
- const targetUrl = `${API_BASE_URL}/${action}`;
+ const targetUrl = `${API_BASE_URL.replace(/\/$/, '')}/${action.replace(/^\//, '')}`;
10
11
try {
12
const cookies = req.headers.get('cookie') || '';
@@ -51,4 +51,4 @@ export async function POST(req, { params }) {
51
{ status: error.response?.status || 500 }
52
);
53
}
54
-}
+}
0 commit comments