Change throttling log messages

This commit is contained in:
Deluan 2023-02-03 21:04:54 -05:00 committed by Deluan Quintão
parent ee6b10db72
commit eba70ab826
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ func (p *Router) routes() http.Handler {
r.Use(server.URLParamsMiddleware) r.Use(server.URLParamsMiddleware)
r.Group(func(r chi.Router) { r.Group(func(r chi.Router) {
if conf.Server.DevArtworkMaxRequests > 0 { if conf.Server.DevArtworkMaxRequests > 0 {
log.Debug("Public images endpoint will be throttled", "maxRequests", conf.Server.DevArtworkMaxRequests, log.Debug("Throttling public images endpoint", "maxRequests", conf.Server.DevArtworkMaxRequests,
"backlogLimit", conf.Server.DevArtworkThrottleBacklogLimit, "backlogTimeout", "backlogLimit", conf.Server.DevArtworkThrottleBacklogLimit, "backlogTimeout",
conf.Server.DevArtworkThrottleBacklogTimeout) conf.Server.DevArtworkThrottleBacklogTimeout)
r.Use(middleware.ThrottleBacklog(conf.Server.DevArtworkMaxRequests, conf.Server.DevArtworkThrottleBacklogLimit, r.Use(middleware.ThrottleBacklog(conf.Server.DevArtworkMaxRequests, conf.Server.DevArtworkThrottleBacklogLimit,

View File

@ -146,7 +146,7 @@ func (api *Router) routes() http.Handler {
r.Group(func(r chi.Router) { r.Group(func(r chi.Router) {
// configure request throttling // configure request throttling
if conf.Server.DevArtworkMaxRequests > 0 { if conf.Server.DevArtworkMaxRequests > 0 {
log.Debug("Subsonic getCoverArt endpoint will be throttled", "maxRequests", conf.Server.DevArtworkMaxRequests, log.Debug("Throttling Subsonic getCoverArt endpoint", "maxRequests", conf.Server.DevArtworkMaxRequests,
"backlogLimit", conf.Server.DevArtworkThrottleBacklogLimit, "backlogTimeout", "backlogLimit", conf.Server.DevArtworkThrottleBacklogLimit, "backlogTimeout",
conf.Server.DevArtworkThrottleBacklogTimeout) conf.Server.DevArtworkThrottleBacklogTimeout)
r.Use(middleware.ThrottleBacklog(conf.Server.DevArtworkMaxRequests, conf.Server.DevArtworkThrottleBacklogLimit, r.Use(middleware.ThrottleBacklog(conf.Server.DevArtworkMaxRequests, conf.Server.DevArtworkThrottleBacklogLimit,