diff --git a/src/openai-service.ts b/src/openai-service.ts index c12f42c..2c7eb69 100644 --- a/src/openai-service.ts +++ b/src/openai-service.ts @@ -184,10 +184,22 @@ async function callNamecheapApi(funcName: string, funcArgs: Record, // 허용된 도메인만 필터링 return result.filter((d: any) => allowedDomains.includes(d.name)); } - case 'get_domain_info': - return fetch(`${apiUrl}/domains/${funcArgs.domain}`, { + case 'get_domain_info': { + const domainInfo = await fetch(`${apiUrl}/domains/${funcArgs.domain}`, { headers: { 'X-API-Key': apiKey }, - }).then(r => r.json()); + }).then(r => r.json()) as any; + // 민감 정보 필터링 (계정 ID 등) + return { + domain: domainInfo.name || funcArgs.domain, + status: domainInfo.status, + created: domainInfo.created, + expires: domainInfo.expires, + auto_renew: domainInfo.auto_renew, + is_locked: domainInfo.is_locked, + is_premium: domainInfo.is_premium, + nameservers: domainInfo.nameservers, + }; + } case 'get_nameservers': return fetch(`${apiUrl}/dns/${funcArgs.domain}/nameservers`, { headers: { 'X-API-Key': apiKey },