Skip to content

Commit 24ec38b

Browse files
chelojimenezclaude
andcommitted
Stop forwarding IP headers to Convex ingest-chat endpoint
Forwarding cf-connecting-ip (and possibly x-forwarded-for) from the browser request to Convex causes Cloudflare to return 403 when the staging server sits behind Cloudflare (staging.mcpjam.com) — the forwarded cf-connecting-ip mismatches the actual connecting IP (Railway server), triggering Cloudflare's WAF. PR previews on *.up.railway.app work because they don't go through Cloudflare, so no cf-connecting-ip header exists to forward. Keep forwarding user-agent and accept-language for device/language enrichment. The removed IP headers were only used for chatbox visitor hashing, which can rely on Cloudflare's own cf-connecting-ip on the Convex side. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 034a6e4 commit 24ec38b

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

mcpjam-inspector/server/utils/chat-ingestion.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ const MAX_RESPONSE_PREVIEW_CHARS = 200;
1212
const ENRICHMENT_HEADERS_TO_FORWARD = [
1313
"user-agent",
1414
"accept-language",
15-
// Client IP headers for visitor hashing
16-
"x-forwarded-for",
17-
"x-real-ip",
18-
"cf-connecting-ip",
1915
] as const;
2016

2117
/**

0 commit comments

Comments
 (0)