Skip to content

Context7 Platform -- Up-to-date docs for AI agents

CTX7-272: ip address header

buggyhunter086d4c2083a9
diff --git a/src/lib/api.ts b/src/lib/api.ts
index bc5eba42..ffb4e161 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -70,7 +70,7 @@ export async function searchLibraries(query: string, clientIp?: string): Promise
const headers: Record<string, string> = {};
if (clientIp) {
- headers["X-Client-IP"] = encryptClientIp(clientIp);
+ headers["mcp-client-ip"] = encryptClientIp(clientIp);
}
const response = await fetch(url, { headers });
@@ -124,7 +124,7 @@ export async function fetchLibraryDocumentation(
"X-Context7-Source": "mcp-server",
};
if (clientIp) {
- headers["X-Client-IP"] = encryptClientIp(clientIp);
+ headers["mcp-client-ip"] = encryptClientIp(clientIp);
}
const response = await fetch(url, { headers });