mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. Introduces some new functions for creating setting.Cfg.
This commit is contained in:
committed by
GitHub
parent
147bf01745
commit
6768c6c059
@@ -107,7 +107,7 @@ func (a *AvatarCacheServer) Handler(ctx *contextmodel.ReqContext) {
|
||||
return
|
||||
}
|
||||
|
||||
avatar := a.GetAvatarForHash(hash)
|
||||
avatar := a.GetAvatarForHash(a.cfg, hash)
|
||||
|
||||
ctx.Resp.Header().Set("Content-Type", "image/jpeg")
|
||||
|
||||
@@ -123,8 +123,8 @@ func (a *AvatarCacheServer) Handler(ctx *contextmodel.ReqContext) {
|
||||
}
|
||||
}
|
||||
|
||||
func (a *AvatarCacheServer) GetAvatarForHash(hash string) *Avatar {
|
||||
if setting.DisableGravatar {
|
||||
func (a *AvatarCacheServer) GetAvatarForHash(cfg *setting.Cfg, hash string) *Avatar {
|
||||
if cfg.DisableGravatar {
|
||||
alog.Warn("'GetGravatarForHash' called despite gravatars being disabled; returning default profile image")
|
||||
return a.notFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user