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.

468 B
Raw Blame
package auth

import "strings"

func DeriveStreamHost(appHost string) string {
	appHost = strings.TrimRight(appHost, "/")

	switch appHost {
	case "https://us.posthog.com", "https://app.posthog.com":
		return "https://live.us.posthog.com"
	case "https://eu.posthog.com":
		return "https://live.eu.posthog.com"
	case "https://app.dev.posthog.dev":
		return "https://live.dev.posthog.dev"
	default:
		return "http://localhost:8010" // Local development stream host
	}
}