Render panel images with any SSL protocol

This uses any available SSL protocol (instead the phantomjs default:
SSLv3) to render panels to PNGs.  This is useful when reverse proxing
grafana and SSLv3 is disabled due to security vulnerabilities or other
reasons.
This commit is contained in:
Brandon Turner 2015-05-25 01:50:29 -05:00
parent 57bacb339c
commit b2a0ae0f83
No known key found for this signature in database
GPG Key ID: 0F82931CA3EE1B07

View File

@ -26,7 +26,7 @@ func RenderToPng(params *RenderOpts) (string, error) {
pngPath, _ := filepath.Abs(filepath.Join(setting.ImagesDir, util.GetRandomString(20)))
pngPath = pngPath + ".png"
cmd := exec.Command(binPath, "--ignore-ssl-errors=true", scriptPath, "url="+params.Url, "width="+params.Width,
cmd := exec.Command(binPath, "--ignore-ssl-errors=true", "--ssl-protocol=any", scriptPath, "url="+params.Url, "width="+params.Width,
"height="+params.Height, "png="+pngPath, "cookiename="+setting.SessionOptions.CookieName,
"domain="+setting.Domain, "sessionid="+params.SessionId)
stdout, err := cmd.StdoutPipe()