Skip to content

Full Toolkit for Next-Level Domain Analysis

Allow caching of WHOIS summary 🧠

Felix Wotschofsky0ad36aeb9d3b
diff --git a/app/api/whois-summary/route.ts b/app/api/whois-summary/route.ts
index 86fb403..9c09dae 100644
--- a/app/api/whois-summary/route.ts
+++ b/app/api/whois-summary/route.ts
@@ -103,7 +103,11 @@ export async function GET(request: Request) {
try {
const summary = await getSummary(domain);
- return Response.json(summary);
+ return Response.json(summary, {
+ headers: {
+ 'Cache-Control': 'public, max-age=600, s-maxage=1800',
+ },
+ });
} catch (error) {
return Response.json(
{ error: true, message: 'Error fetching whois summary' },