We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c81b8a0 + 760f0cb commit 86b18dcCopy full SHA for 86b18dc
1 file changed
src/app/panel/QueryClientProvider.tsx
@@ -54,12 +54,18 @@ async function axiosQueryFn({
54
// 예: https://localhost:3000 + /api + /health
55
endpoint = `${siteUrl}${apiBase}${path}`;
56
} else {
57
- // 3. 클라이언트일 때는 axiosClient의 baseURL(/api)이 있으므로 path만 전달
58
- endpoint = path;
+ // 3. 클라이언트에서도 /api 프리픽스를 명시해 프록시를 강제
+ const base = apiBase.startsWith("/") ? apiBase : `/${apiBase}`;
59
+ endpoint = `${base}${path}`;
60
}
61
62
- const res = await axiosClient.get(endpoint, { params, signal });
63
+ const res = await axiosClient.get(endpoint, {
64
+ params,
65
+ signal,
66
+ // endpoint에 /api를 포함했으므로 baseURL을 비활성화
67
+ baseURL: "",
68
+ });
69
return res.data;
70
71
0 commit comments