Skip to content

Commit

Permalink
use nextjs headers to implement caching (#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
Myestery authored Jul 2, 2024
1 parent c97f691 commit 9df4355
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ const config = {
images: {
domains: ["app.osmosis.zone", "raw.githubusercontent.com", "pbs.twimg.com"],
},
async headers() {
return [
{
source: "/favicon.ico",
headers: [
{
key: "Cache-Control",
value: "public, max-age=864000", // Cache for 10 days
},
],
},
];
},
webpack(config) {
/**
* Add sprite.svg to bundle and append hash to revalidate cache when content changes.
Expand Down

0 comments on commit 9df4355

Please sign in to comment.