MM-8701 Limit the number of client config fields sent before user logs in (#8954)
* MM-8701 Limit the number of client config fields sent before user logs in * Fixed missing client config field * Reduced duplication between limited and regular client config
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f48d31c7a4
Коммит
6d8140337e
@@ -250,7 +250,14 @@ func getClientConfig(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Write([]byte(model.MapToJson(c.App.ClientConfigWithComputed())))
|
||||
var config map[string]string
|
||||
if *c.App.Config().ServiceSettings.ExperimentalLimitClientConfig && len(c.Session.UserId) == 0 {
|
||||
config = c.App.LimitedClientConfigWithComputed()
|
||||
} else {
|
||||
config = c.App.ClientConfigWithComputed()
|
||||
}
|
||||
|
||||
w.Write([]byte(model.MapToJson(config)))
|
||||
}
|
||||
|
||||
func getEnvironmentConfig(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Ссылка в новой задаче
Block a user