mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 18:26:38 -04:00
re-add Percy screenshotting action
This commit is contained in:
@ -81,8 +81,8 @@ module.exports = async (req, res) => {
|
||||
|
||||
const repos = await fetchRepos(sortBy, 16);
|
||||
|
||||
// let Vercel edge cache results for 10 mins
|
||||
res.setHeader("Cache-Control", "s-maxage=600, stale-while-revalidate");
|
||||
// let Vercel edge cache results for 15 mins
|
||||
res.setHeader("Cache-Control", "s-maxage=900, stale-while-revalidate");
|
||||
res.setHeader("Access-Control-Allow-Methods", "GET");
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
return res.json(repos);
|
||||
|
@ -73,6 +73,8 @@ module.exports = async (req, res) => {
|
||||
stats.total.pretty_hits = numeral(stats.total.hits).format("0,0");
|
||||
stats.total.pretty_unit = pluralize("hit", stats.total.hits);
|
||||
|
||||
// let Vercel edge cache results for 15 mins
|
||||
res.setHeader("Cache-Control", "s-maxage=900, stale-while-revalidate");
|
||||
res.setHeader("Access-Control-Allow-Methods", "GET");
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
return res.json(stats);
|
||||
|
Reference in New Issue
Block a user