mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
If the license is cloud, use the SiteURL instead of the X-Forwarded-Proto header (#19393)
This commit is contained in:
@@ -207,6 +207,9 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
subpath, _ := utils.GetSubpathFromConfig(c.App.Config())
|
||||
siteURLHeader := app.GetProtocol(r) + "://" + r.Host + subpath
|
||||
if c.App.Srv().License() != nil && *c.App.Srv().License().Features.Cloud {
|
||||
siteURLHeader = *c.App.Config().ServiceSettings.SiteURL + subpath
|
||||
}
|
||||
c.SetSiteURLHeader(siteURLHeader)
|
||||
|
||||
w.Header().Set(model.HeaderRequestId, c.AppContext.RequestId())
|
||||
|
||||
Reference in New Issue
Block a user