Repository navigation
Route PostHog feature flags through managed proxy - #7232
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughA single configuration option, ChangesPostHog Init Config
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| person_profiles: "identified_only", | ||
| capture_pageview: false, | ||
| capture_pageleave: true, | ||
| advanced_disable_feature_flags: true, |
There was a problem hiding this comment.
advanced_disable_feature_flags is a legacy option marked for deprecation. The recommended replacement is advanced_disable_flags, which behaves identically but is the forward-compatible name. Switching now avoids a future breaking change when the deprecated key is eventually removed from the SDK.
| advanced_disable_feature_flags: true, | |
| advanced_disable_flags: true, |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7e3899c9e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| person_profiles: "identified_only", | ||
| capture_pageview: false, | ||
| capture_pageleave: true, | ||
| advanced_disable_feature_flags: true, |
There was a problem hiding this comment.
Use the endpoint-level disable flag
PostHog documents advanced_disable_feature_flags as keeping the /flags endpoint running while skipping feature-flag evaluation, whereas advanced_disable_flags is the option that completely disables /flags. If the goal is the verified “no network requests matching flags” behavior on cmux.com, this line can still leave /flags traffic (or periodic refresh traffic); use advanced_disable_flags: true to remove the endpoint entirely, or remote_config_refresh_interval_ms: 0 if only background polling should stop.
Useful? React with 👍 / 👎.
e7e3899 to
74d78ac
Compare
74d78ac to
c700c80
Compare
c700c80 to
ae6c62b
Compare
Summary
https://r.cmux.comhttps://r.cmux.devwithflags_api_hostTesting
cd web && bun run typecheckcd web && bun run lint(existing warnings only)cd web && source scripts/load-dev-env.sh && bun run buildhttp://127.0.0.1:4538/,/handler/sign-in, and/handler/after-sign-inr.cmux.comandr.cmux.devresolves to PostHog managed proxy CNAMEsapi_host: "https://r.cmux.com"andflags_api_host: "https://r.cmux.dev", with noadvanced_disable_flagsNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
Note
Low Risk
Single-line PostHog config change; no auth or data-model impact, though misconfigured DNS/proxy for the flags host could break flag loading in the client.
Overview
PostHog client init now sends feature flag requests to
https://r.cmux.devviaflags_api_host, while analytics traffic stays onhttps://r.cmux.com(api_hostunchanged).This splits flag evaluation onto a dedicated managed proxy so flags can stay on for upcoming pricing work without pushing that traffic through the Vercel proxy path.
Reviewed by Cursor Bugbot for commit ba094de. Bugbot is set up for automated code reviews on this repo. Configure here.