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.

454 B
Raw Blame
import { CLOUD_HOSTNAMES } from 'lib/constants'

import { Region } from '~/types'

export function otherRegionOf(region: Region): Region {
    return region === Region.US ? Region.EU : Region.US
}

// Preserve the query string (e.g. `next`) but always land on the login page of the other region.
export function otherRegionLoginUrl(region: Region, search: string): string {
    return `https://${CLOUD_HOSTNAMES[otherRegionOf(region)]}/login${search}`
}