summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-01-25 11:11:26 -0500
committerGitHub <noreply@github.com>2017-01-25 11:11:26 -0500
commit504f3e17238058ceebeb0af506ef3838ec8e40f8 (patch)
tree05e20f8368d1e9225ce89faac61ef2ab917c5393 /api/context.go
parentd245b29f82a03f1aff966a2fb2100a5703d82f32 (diff)
downloadchat-504f3e17238058ceebeb0af506ef3838ec8e40f8.tar.gz
chat-504f3e17238058ceebeb0af506ef3838ec8e40f8.tar.bz2
chat-504f3e17238058ceebeb0af506ef3838ec8e40f8.zip
Fix siteURL not being set correctly (#5189)
Diffstat (limited to 'api/context.go')
-rw-r--r--api/context.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/context.go b/api/context.go
index edee8bb21..e998138a6 100644
--- a/api/context.go
+++ b/api/context.go
@@ -144,6 +144,8 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if utils.GetSiteURL() == "" {
protocol := GetProtocol(r)
c.SetSiteURL(protocol + "://" + r.Host)
+ } else {
+ c.SetSiteURL(utils.GetSiteURL())
}
w.Header().Set(model.HEADER_REQUEST_ID, c.RequestId)