From 5ef46a9428a41682f5822db4873d1677460f1b3a Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Wed, 12 May 2021 00:13:37 -0700 Subject: [PATCH] Live: use the browser url to build websocket url, not appUrl (#33968) --- public/app/features/live/live.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/live/live.ts b/public/app/features/live/live.ts index 6df4ed86756..a41dd10afb9 100644 --- a/public/app/features/live/live.ts +++ b/public/app/features/live/live.ts @@ -54,8 +54,8 @@ export class CentrifugeSrv implements GrafanaLiveSrv { private orgId: number; constructor() { - // build live url replacing scheme in appUrl. - const liveUrl = `${config.appUrl.replace('http', 'ws')}api/live/ws`; + const baseURL = window.location.origin.replace('http', 'ws'); + const liveUrl = `${baseURL}/${config.appSubUrl}api/live/ws`; this.orgId = (window as any).grafanaBootData.user.orgId; this.centrifuge = new Centrifuge(liveUrl, { debug: true,