diff --git a/lib/authz.js b/lib/authz.js index 4712788..d2626a1 100644 --- a/lib/authz.js +++ b/lib/authz.js @@ -83,7 +83,7 @@ async function addRequestedHeaders(req, res, route, user, discoveredGroups) { async function getRequestHeaderMapConfig(user, route) { var userId = user.id var userGroups = user.groups - var requestHeaderMap = requestHeaderMapCache.get(`${userId}-${route}`) + var requestHeaderMap = requestHeaderMapCache.get(`${userId}-${JSON.stringify(route)}`) if (requestHeaderMap) { log.trace("Returning requestHeaderMap from cache") return requestHeaderMap @@ -111,7 +111,7 @@ async function getRequestHeaderMapConfig(user, route) { ...requestHeaderMap[userId], } } - requestHeaderMapCache.put(`${userId}-${route}`, result) + requestHeaderMapCache.put(`${userId}-${JSON.stringify(route)}`, result) return result } catch (error) { log.error({ message: "Unable to get config for requestHeaderMap", context: { error: error.message, stack: error.stack, route: route } })