mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-12-03 13:44:09 +01:00
Merge pull request #3780 from nichwall/api_cache_case_insensitive
API Cache Manager route uses case-insensitive match
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -42,6 +42,8 @@ class ApiCacheManager {
|
||||
Logger.debug(`[ApiCacheManager] Skipping cache for random sort`)
|
||||
return next()
|
||||
}
|
||||
// Force URL to be lower case for matching against routes
|
||||
req.url = req.url.toLowerCase()
|
||||
const key = { user: req.user.username, url: req.url }
|
||||
const stringifiedKey = JSON.stringify(key)
|
||||
Logger.debug(`[ApiCacheManager] count: ${this.cache.size} size: ${this.cache.calculatedSize}`)
|
||||
|
||||
Reference in new issue
Block a user