Trim / from SiteURL before sending to client (#3966)

This commit is contained in:
Joram Wilander
2016-09-06 14:56:18 -04:00
committed by Harrison Healey
parent 558821bc54
commit 0d11fc88ea

View File

@@ -11,6 +11,7 @@ import (
"os"
"path/filepath"
"strconv"
"strings"
l4g "github.com/alecthomas/log4go"
@@ -218,7 +219,7 @@ func getClientConfig(c *model.Config) map[string]string {
props["BuildHashEnterprise"] = model.BuildHashEnterprise
props["BuildEnterpriseReady"] = model.BuildEnterpriseReady
props["SiteURL"] = *c.ServiceSettings.SiteURL
props["SiteURL"] = strings.TrimRight(*c.ServiceSettings.SiteURL, "/")
props["SiteName"] = c.TeamSettings.SiteName
props["EnableTeamCreation"] = strconv.FormatBool(c.TeamSettings.EnableTeamCreation)
props["EnableUserCreation"] = strconv.FormatBool(c.TeamSettings.EnableUserCreation)