refactor(WEB): 코드 품질 개선 및 불필요 코드 제거
- 미사용 import/변수/console.log 대량 정리 (100+개 파일) - ItemMasterContext 간소화 (미사용 로직 제거) - IntegratedListTemplateV2 / UniversalListPage 개선 - 결재 컴포넌트(ApprovalBox, DraftBox, ReferenceBox) 정리 - HR 컴포넌트(급여/휴가/부서) 코드 간소화 - globals.css 스타일 정리 및 개선 - AuthenticatedLayout 개선 - middleware CSP 정리 - proxy route 불필요 로깅 제거 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -112,9 +112,6 @@ async function proxyRequest(
|
||||
if (['POST', 'PUT', 'DELETE', 'PATCH'].includes(method)) {
|
||||
if (contentType.includes('application/json')) {
|
||||
body = await request.text();
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('🔵 [PROXY] Request:', method, url.pathname);
|
||||
}
|
||||
} else if (contentType.includes('multipart/form-data')) {
|
||||
isFormData = true;
|
||||
|
||||
@@ -130,13 +127,6 @@ async function proxyRequest(
|
||||
}
|
||||
|
||||
body = newFormData;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('🔵 [PROXY] Request:', method, url.pathname);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('🔵 [PROXY] Request:', method, url.pathname);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,9 +165,6 @@ async function proxyRequest(
|
||||
}
|
||||
|
||||
// 7. 응답 처리 (바이너리 vs 텍스트/JSON)
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('🔵 [PROXY] Response status:', backendResponse.status);
|
||||
}
|
||||
const responseContentType = backendResponse.headers.get('content-type') || 'application/json';
|
||||
|
||||
const isBinaryResponse =
|
||||
@@ -192,9 +179,6 @@ async function proxyRequest(
|
||||
let clientResponse: NextResponse;
|
||||
|
||||
if (isBinaryResponse) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('📄 [PROXY] Binary response detected:', responseContentType);
|
||||
}
|
||||
const binaryData = await backendResponse.arrayBuffer();
|
||||
|
||||
clientResponse = new NextResponse(binaryData, {
|
||||
@@ -221,9 +205,6 @@ async function proxyRequest(
|
||||
createTokenCookies(newTokens).forEach(cookie => {
|
||||
clientResponse.headers.append('Set-Cookie', cookie);
|
||||
});
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('🍪 [PROXY] New tokens set in cookies');
|
||||
}
|
||||
}
|
||||
|
||||
return clientResponse;
|
||||
|
||||
Reference in New Issue
Block a user