From c610eff5cd539c4dacf9410d17a41d242aac6e89 Mon Sep 17 00:00:00 2001 From: Alexander Emelin Date: Mon, 10 May 2021 19:56:02 +0300 Subject: [PATCH] live: move connection endpoint to api scope, fixes #33861 (#33863) --- pkg/services/live/live.go | 2 +- public/app/features/live/live.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/services/live/live.go b/pkg/services/live/live.go index 24010553e84..12a93f1ca78 100644 --- a/pkg/services/live/live.go +++ b/pkg/services/live/live.go @@ -254,7 +254,7 @@ func (g *GrafanaLive) Init() error { pushWSHandler.ServeHTTP(ctx.Resp, r) } - g.RouteRegister.Group("/live", func(group routing.RouteRegister) { + g.RouteRegister.Group("/api/live", func(group routing.RouteRegister) { group.Get("/ws", g.websocketHandler) }, middleware.ReqSignedIn) diff --git a/public/app/features/live/live.ts b/public/app/features/live/live.ts index e23ed508f3c..9b2b2a508a1 100644 --- a/public/app/features/live/live.ts +++ b/public/app/features/live/live.ts @@ -54,7 +54,7 @@ export class CentrifugeSrv implements GrafanaLiveSrv { constructor() { // build live url replacing scheme in appUrl. - const liveUrl = `${config.appUrl.replace('http', 'ws')}live/ws`; + const liveUrl = `${config.appUrl.replace('http', 'ws')}api/live/ws`; this.centrifuge = new Centrifuge(liveUrl, { debug: true, });