diff options
author | Chris <ccbrown112@gmail.com> | 2018-02-22 18:23:32 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-22 18:23:32 -0600 |
commit | d44ef7ea67324072f3fbf1230c77f0ee0b4ac8bd (patch) | |
tree | 250e6f64e10631d6e0470e57916d82c897fc8b6a /app/config.go | |
parent | 1b3808f3ecf754876168a9342e18c46d49f32ddf (diff) | |
download | chat-d44ef7ea67324072f3fbf1230c77f0ee0b4ac8bd.tar.gz chat-d44ef7ea67324072f3fbf1230c77f0ee0b4ac8bd.tar.bz2 chat-d44ef7ea67324072f3fbf1230c77f0ee0b4ac8bd.zip |
Remove global site url (#8343)
* remove global site url
* missed one
* revert mysterious change
Diffstat (limited to 'app/config.go')
-rw-r--r-- | app/config.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/config.go b/app/config.go index a9cd84d90..35a0c9a3f 100644 --- a/app/config.go +++ b/app/config.go @@ -14,6 +14,7 @@ import ( "fmt" "net/url" "runtime/debug" + "strings" l4g "github.com/alecthomas/log4go" @@ -54,7 +55,7 @@ func (a *App) LoadConfig(configFile string) *model.AppError { a.config.Store(cfg) - utils.SetSiteURL(*cfg.ServiceSettings.SiteURL) + a.siteURL = strings.TrimRight(*cfg.ServiceSettings.SiteURL, "/") a.InvokeConfigListeners(old, cfg) return nil @@ -264,3 +265,7 @@ func (a *App) GetCookieDomain() string { } return "" } + +func (a *App) GetSiteURL() string { + return a.siteURL +} |