1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-14 16:40:50 -05:00

add prefix to redis keys

This commit is contained in:
2025-04-04 08:49:42 -04:00
parent 774c3a5d96
commit 2b9c421d42
9 changed files with 65 additions and 87 deletions

View File

@@ -12,7 +12,7 @@ const HitCounter = async ({ slug }: { slug: string }) => {
// TODO: maybe don't allow this? or maybe it's fine? kinda unclear how secure this is:
// https://nextjs.org/blog/security-nextjs-server-components-actions
// https://nextjs.org/docs/app/building-your-application/rendering/server-components
const hits = await redis.incr(slug);
const hits = await redis.incr(`hits:${slug}`);
// we have data!
return (