diff --git a/pkg/api/index.go b/pkg/api/index.go index 678d42a6dcb..ba65065fc74 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"] = ""