diff --git a/server/managers/ApiCacheManager.js b/server/managers/ApiCacheManager.js index 81b58c9945..2d8eece85e 100644 --- a/server/managers/ApiCacheManager.js +++ b/server/managers/ApiCacheManager.js @@ -42,8 +42,7 @@ 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}`) diff --git a/server/routers/ApiRouter.js b/server/routers/ApiRouter.js index db9e66c5fb..5d706e6587 100644 --- a/server/routers/ApiRouter.js +++ b/server/routers/ApiRouter.js @@ -65,7 +65,7 @@ class ApiRouter { // // Library Routes // - this.router.get(/^\/libraries/i, this.apiCacheManager.middleware) + this.router.get(/^\/libraries/, this.apiCacheManager.middleware) this.router.post('/libraries', LibraryController.create.bind(this)) this.router.get('/libraries', LibraryController.findAll.bind(this)) this.router.get('/libraries/:id', LibraryController.middleware.bind(this), LibraryController.findOne.bind(this))