From def387d8117b73455a92ba2563f0ad4395c08463 Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Mon, 5 May 2025 15:06:14 +0100 Subject: [PATCH] fix: disable /random route cache --- src/app/random/route.ts | 2 +- src/components/header.tsx | 8 +++----- src/components/random-link.tsx | 13 +++++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 src/components/random-link.tsx diff --git a/src/app/random/route.ts b/src/app/random/route.ts index 5aaf311..79c8a9b 100644 --- a/src/app/random/route.ts +++ b/src/app/random/route.ts @@ -5,7 +5,7 @@ import { prisma } from "@/lib/prisma"; import { RateLimit } from "@/lib/rate-limit"; export async function GET(request: NextRequest) { - const rateLimit = new RateLimit(request, 16); + const rateLimit = new RateLimit(request, 20); const check = await rateLimit.handle(); if (check) return check; diff --git a/src/components/header.tsx b/src/components/header.tsx index 6ff4582..dea3349 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -1,10 +1,10 @@ import Image from "next/image"; import Link from "next/link"; -import { Icon } from "@iconify/react"; import { auth } from "@/lib/auth"; import SearchBar from "./search-bar"; +import RandomLink from "./random-link"; import ProfileOverview from "./profile-overview"; import LogoutButton from "./logout-button"; @@ -14,7 +14,7 @@ export default async function Header() { return (
- logo + logo TomodachiShare @@ -24,9 +24,7 @@ export default async function Header() {