From b8b618241ec46b555c097fc8faedbddb758b7210 Mon Sep 17 00:00:00 2001 From: Boris Granveaud Date: Mon, 6 Jan 2020 08:12:18 +0100 Subject: [PATCH] Rendering: Fix panel PNG rendering when using sub url & serve_from_sub_path = true (#21306) * Rendering: fix dashboard rendering when using sub url * rollback on render.go: no need to add sub-path --- pkg/api/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/index.go b/pkg/api/index.go index ad9dc18d9a7..916e606ed18 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -43,7 +43,7 @@ func (hs *HTTPServer) setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, er appSubURL := setting.AppSubUrl // special case when doing localhost call from phantomjs - if c.IsRenderCall { + if c.IsRenderCall && !hs.Cfg.ServeFromSubPath { appURL = fmt.Sprintf("%s://localhost:%s", setting.Protocol, setting.HttpPort) appSubURL = "" settings["appSubUrl"] = ""