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
+25 -17
View File
@@ -64,18 +64,22 @@ const nextConfig: NextConfig = {
},
],
},
{
// https://community.torproject.org/onion-services/advanced/onion-location/
// only needed on actual pages, not static assets, so make a best effort by matching any path **without** a file
// extension (aka a period) and/or an underscore (e.g. /_next/image).
source: "/:path([^._]*)",
headers: [
{
key: "onion-location",
value: `http://${process.env.NEXT_PUBLIC_ONION_DOMAIN}/:path`,
},
],
},
...(process.env.NEXT_PUBLIC_ONION_DOMAIN
? [
{
// https://community.torproject.org/onion-services/advanced/onion-location/
// only needed on actual pages, not static assets, so make a best effort by matching any path **without** a file
// extension (aka a period) and/or an underscore (e.g. /_next/image).
source: "/:path([^._]*)",
headers: [
{
key: "onion-location",
value: `http://${process.env.NEXT_PUBLIC_ONION_DOMAIN}/:path`,
},
],
},
]
: []),
{
source: "/tweets(|/.*)",
headers: [
@@ -87,11 +91,15 @@ const nextConfig: NextConfig = {
},
],
rewrites: async () => [
{
// https://umami.is/docs/guides/running-on-vercel#proxy-umami-analytics-via-vercel
source: "/_stream/u/:path(script.js|api/send)",
destination: `${process.env.NEXT_PUBLIC_UMAMI_URL || "https://cloud.umami.is"}/:path`,
},
...(process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID
? [
{
// https://umami.is/docs/guides/running-on-vercel#proxy-umami-analytics-via-vercel
source: "/_stream/u/:path(script.js|api/send)",
destination: `${process.env.NEXT_PUBLIC_UMAMI_URL || "https://cloud.umami.is"}/:path`,
},
]
: []),
{
// https://github.com/jakejarvis/tweets
source: "/tweets/:path*",