Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fixed redis lookup.
Mike Cao3bb82aebd8cb
diff --git a/src/lib/middleware.ts b/src/lib/middleware.tsindex 5796009ba..91fb6c7c4 100644--- a/src/lib/middleware.ts+++ b/src/lib/middleware.ts@@ -61,7 +61,9 @@ export const useAuth = createMiddleware(async (req, res, next) => {} else if (redis.enabled && authKey) {const key = await redis.client.get(authKey);- user = await getUserById(key?.userId);+ if (key?.userId) {+ user = await getUserById(key.userId);+ }}if (process.env.NODE_ENV === 'development') {