Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(agent-proxy): allow x-posthog-distinct-id header in stream CORS (#67219)

Charles Viend88e7a783aed
diff --git a/services/agent-proxy/src/lib/constants.ts b/services/agent-proxy/src/lib/constants.ts
index 11a86ef62adf..ba8ce339915b 100644
--- a/services/agent-proxy/src/lib/constants.ts
+++ b/services/agent-proxy/src/lib/constants.ts
@@ -78,7 +78,7 @@ export const MAX_EVENTS_PER_REQUEST = 1_000
// CORS headers (must match the Python ASGI middleware values exactly)
export const CORS_ALLOW_METHODS = 'GET, POST, OPTIONS'
export const CORS_ALLOW_HEADERS =
- 'authorization, last-event-id, content-type, accept, x-csrftoken, x-posthog-session-id'
+ 'authorization, last-event-id, content-type, accept, x-csrftoken, x-posthog-distinct-id, x-posthog-session-id'
export const CORS_MAX_AGE = '600'
// JWT audience strings (must match Python validate_* helpers)