Fix siteURL not being set correctly (#5189)

This commit is contained in:
Joram Wilander
2017-01-25 11:11:26 -05:00
committed by GitHub
parent d245b29f82
commit 504f3e1723

View File

@@ -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)