[SSR 비활성화] SPA 방식으로 변경
This commit is contained in:
@@ -19,18 +19,6 @@ export default defineNuxtPlugin(() => {
|
||||
...(isFormData ? {} : { "Content-Type": "application/json" }),
|
||||
...(options.headers || {}),
|
||||
};
|
||||
|
||||
// 3) SSR 쿠키 포워딩
|
||||
if (import.meta.server) {
|
||||
const cookie = useRequestHeaders(["cookie"])?.cookie;
|
||||
const reqUrl = String(request);
|
||||
const isBackendApi =
|
||||
!reqUrl.startsWith("http") || reqUrl.startsWith(baseURL);
|
||||
|
||||
if (cookie && isBackendApi) {
|
||||
options.headers = { ...(options.headers || {}), cookie } as any;
|
||||
}
|
||||
}
|
||||
},
|
||||
onResponseError({ response }) {
|
||||
// 공통 로깅
|
||||
|
||||
Reference in New Issue
Block a user