mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Live: use the browser url to build websocket url, not appUrl (#33968)
This commit is contained in:
parent
69d9f427e1
commit
5ef46a9428
@ -54,8 +54,8 @@ export class CentrifugeSrv implements GrafanaLiveSrv {
|
|||||||
private orgId: number;
|
private orgId: number;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
// build live url replacing scheme in appUrl.
|
const baseURL = window.location.origin.replace('http', 'ws');
|
||||||
const liveUrl = `${config.appUrl.replace('http', 'ws')}api/live/ws`;
|
const liveUrl = `${baseURL}/${config.appSubUrl}api/live/ws`;
|
||||||
this.orgId = (window as any).grafanaBootData.user.orgId;
|
this.orgId = (window as any).grafanaBootData.user.orgId;
|
||||||
this.centrifuge = new Centrifuge(liveUrl, {
|
this.centrifuge = new Centrifuge(liveUrl, {
|
||||||
debug: true,
|
debug: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user