Live: use the browser url to build websocket url, not appUrl (#33968)

pull/33983/head
Ryan McKinley 4 years ago committed by GitHub
parent 69d9f427e1
commit 5ef46a9428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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,

Loading…
Cancel
Save