Skip to content

Commit

Permalink
Cache upvotes to ens name route
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDaub committed Nov 11, 2024
1 parent a7b47e0 commit 988ecf2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/http.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,10 @@ export async function launch(trie, libp2p) {
}
const profile = await resolve(request.query.address);
if (profile && profile.ens) {
reply.header(
"Cache-Control",
"public, s-maxage=86400, max-age=86400, stale-while-revalidate=86400",
);
return reply.redirect(301, `/${profile.ens}`);
}

Expand Down

0 comments on commit 988ecf2

Please sign in to comment.