mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-12 13:18:40 +01:00
Add dev option to increase external metadata cache expiration. More logs
This commit is contained in:
parent
588ee94f7c
commit
ad2ad514b3
4 changed files with 18 additions and 7 deletions
|
|
@ -146,8 +146,10 @@ func (api *Router) routes() http.Handler {
|
|||
r.Group(func(r chi.Router) {
|
||||
// configure request throttling
|
||||
if conf.Server.DevArtworkMaxRequests > 0 {
|
||||
maxRequests := conf.Server.DevArtworkMaxRequests
|
||||
r.Use(middleware.ThrottleBacklog(maxRequests, conf.Server.DevArtworkThrottleBacklogLimit,
|
||||
log.Debug("Subsonic getCoverArt endpoint will be throttled", "maxRequests", conf.Server.DevArtworkMaxRequests,
|
||||
"backlogLimit", conf.Server.DevArtworkThrottleBacklogLimit, "backlogTimeout",
|
||||
conf.Server.DevArtworkThrottleBacklogTimeout)
|
||||
r.Use(middleware.ThrottleBacklog(conf.Server.DevArtworkMaxRequests, conf.Server.DevArtworkThrottleBacklogLimit,
|
||||
conf.Server.DevArtworkThrottleBacklogTimeout))
|
||||
}
|
||||
hr(r, "getCoverArt", api.GetCoverArt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue