-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Safely add livestream host #28727
Conversation
Size Change: +32 B (0%) Total Size: 9.72 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds proper livestream host configuration across the PostHog stack, focusing on safe and consistent host resolution.
- Added new
LIVESTREAM_HOST
environment variable in/posthog/settings/web.py
for configuring the livestream connection endpoint - Modified
/frontend/src/lib/utils/apiHost.ts
to use app context for livestream host resolution with proper fallbacks for different environments - Added
livestream_host
to frontend app context in/posthog/utils.py
to expose the configuration to client-side - Extended AppContext interface in
/frontend/src/types.ts
with optionallivestream_host
property
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... I think this works now, but tricky to test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
@@ -126,6 +126,7 @@ $TLS_BLOCK | |||
$DOMAIN, http://, https:// { | |||
encode gzip zstd | |||
reverse_proxy http://web:8000 | |||
reverse_proxy http://livestream:8666 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aaaaahhhhhhh, dang of course
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Paul D'Ambra <[email protected]> Co-authored-by: James Greenhill <[email protected]>
Problem
Re-adds the livestream host in a way that doesn't break things....
How did you test this code?
locally this runs and livestream works
in self-hosted if i manually add the livestream service then I can see livestream start and try to connect to the incorrect host (because it doesn't have this change)