mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Image Renderer: Minor refactor cleanup (#100089)
This commit is contained in:
parent
4c52abb6b4
commit
21bfdd445f
@ -424,7 +424,7 @@ func (rs *RenderingService) getNewFilePath(rt RenderType) (string, error) {
|
||||
|
||||
// getGrafanaCallbackURL creates a URL to send to the image rendering as callback for rendering a Grafana resource
|
||||
func (rs *RenderingService) getGrafanaCallbackURL(path string) string {
|
||||
if rs.Cfg.RendererUrl != "" {
|
||||
if rs.Cfg.RendererUrl != "" || rs.Cfg.RendererCallbackUrl != "" {
|
||||
// The backend rendering service can potentially be remote.
|
||||
// So we need to use the root_url to ensure the rendering service
|
||||
// can reach this Grafana instance.
|
||||
@ -433,11 +433,6 @@ func (rs *RenderingService) getGrafanaCallbackURL(path string) string {
|
||||
return fmt.Sprintf("%s%s&render=1", rs.Cfg.RendererCallbackUrl, path)
|
||||
}
|
||||
|
||||
if rs.Cfg.RendererCallbackUrl != "" {
|
||||
// &render=1 signals to the legacy redirect layer to
|
||||
return fmt.Sprintf("%s%s&render=1", rs.Cfg.RendererCallbackUrl, path)
|
||||
}
|
||||
|
||||
protocol := rs.Cfg.Protocol
|
||||
switch protocol {
|
||||
case setting.HTTPScheme:
|
||||
|
Loading…
Reference in New Issue
Block a user