cache proxied images for 1 day
This commit is contained in:
parent
17d72310bb
commit
86a7bd21eb
1 changed files with 3 additions and 0 deletions
|
@ -33,5 +33,8 @@ export default async (req, res) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
res.status(proxyRes.status);
|
res.status(proxyRes.status);
|
||||||
|
if (proxyRes.ok) {
|
||||||
|
res.setHeader("Cache-Control", "public, max-age=86400"); // 1 day
|
||||||
|
}
|
||||||
streamPipeline(proxyRes.body, res);
|
streamPipeline(proxyRes.body, res);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue