Skip to content

Commit

Permalink
Req URL is lowercase in ApiCacheManager
Browse files Browse the repository at this point in the history
  • Loading branch information
nichwall committed Jan 3, 2025
1 parent a6fd0c9 commit f70f214
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/managers/ApiCacheManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down

0 comments on commit f70f214

Please sign in to comment.