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(ai): prevent duplicate site address in copied chat links (#124952)

Paul D'Ambrab9a06e0d2e3e
diff --git a/frontend/src/scenes/urls.ts b/frontend/src/scenes/urls.ts
index b425d42e37aa..c58eead0b7e1 100644
--- a/frontend/src/scenes/urls.ts
+++ b/frontend/src/scenes/urls.ts
@@ -46,7 +46,7 @@ export interface AnalyticsListUrlParams {
export const urls = {
...productUrls,
- absolute: (path = ''): string => window.location.origin + path,
+ absolute: (path = ''): string => new URL(path, window.location.origin).href,
default: (): string => '/',
project: (id: string | number, path = ''): string => `/project/${id}` + path,
currentProject: (path = ''): string => urls.project(getCurrentTeamId(), path),