diff options
author | cpanato <ctadeu@gmail.com> | 2018-07-12 19:50:16 +0200 |
---|---|---|
committer | cpanato <ctadeu@gmail.com> | 2018-07-12 19:50:16 +0200 |
commit | adc56ae78df2a84c14c5e2921ec9cb14817a2474 (patch) | |
tree | a66d4646ecc3baef4d365f7148fe3921ab267e15 /web | |
parent | 8cad7070acc537d070edd1029fe0c6ce422ab0ed (diff) | |
parent | 2e861c4df4063f325df40861ee045c0136d34f1e (diff) | |
download | chat-adc56ae78df2a84c14c5e2921ec9cb14817a2474.tar.gz chat-adc56ae78df2a84c14c5e2921ec9cb14817a2474.tar.bz2 chat-adc56ae78df2a84c14c5e2921ec9cb14817a2474.zip |
Merge remote-tracking branch 'upstream/release-5.1' into release-5.1-daily-merge-20180712
Diffstat (limited to 'web')
-rw-r--r-- | web/handlers.go | 4 | ||||
-rw-r--r-- | web/saml.go | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/web/handlers.go b/web/handlers.go index c089f460b..71a43bc48 100644 --- a/web/handlers.go +++ b/web/handlers.go @@ -68,7 +68,9 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } } - c.SetSiteURLHeader(app.GetProtocol(r) + "://" + r.Host) + subpath, _ := utils.GetSubpathFromConfig(c.App.Config()) + siteURLHeader := app.GetProtocol(r) + "://" + r.Host + subpath + c.SetSiteURLHeader(siteURLHeader) w.Header().Set(model.HEADER_REQUEST_ID, c.RequestId) w.Header().Set(model.HEADER_VERSION_ID, fmt.Sprintf("%v.%v.%v.%v", model.CurrentVersion, model.BuildNumber, c.App.ClientConfigHash(), c.App.License() != nil)) diff --git a/web/saml.go b/web/saml.go index f3e5a12e8..9cf93bdab 100644 --- a/web/saml.go +++ b/web/saml.go @@ -8,7 +8,6 @@ import ( "net/http" "strings" - "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/mlog" "github.com/mattermost/mattermost-server/model" ) @@ -143,7 +142,7 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) { if action == model.OAUTH_ACTION_MOBILE { ReturnStatusOK(w) } else { - http.Redirect(w, r, app.GetProtocol(r)+"://"+r.Host, http.StatusFound) + http.Redirect(w, r, c.GetSiteURLHeader(), http.StatusFound) } } } |