cache proxied images for 1 day

This commit is contained in:
Matt Dunn-Rankin 2020-04-30 00:13:35 -07:00
parent 17d72310bb
commit 86a7bd21eb

View file

@ -33,5 +33,8 @@ export default async (req, res) => {
);
res.status(proxyRes.status);
if (proxyRes.ok) {
res.setHeader("Cache-Control", "public, max-age=86400"); // 1 day
}
streamPipeline(proxyRes.body, res);
};