Don't expose Last.fm API Key in the index.html

This commit is contained in:
Deluan
2024-01-29 21:41:54 -05:00
parent 3a9b3452a2
commit 1f71e56741
6 changed files with 11 additions and 16 deletions
+3
View File
@@ -77,6 +77,9 @@ func buildAuthPayload(user *model.User) map[string]interface{} {
if conf.Server.EnableGravatar && user.Email != "" {
payload["avatar"] = gravatar.Url(user.Email, 50)
}
if conf.Server.LastFM.Enabled {
payload["lastFMApiKey"] = conf.Server.LastFM.ApiKey
}
bytes := make([]byte, 3)
_, err := rand.Read(bytes)