forward Cache-Control response header too!

This commit is contained in:
Matt Dunn-Rankin 2020-04-30 00:18:01 -07:00
parent 86a7bd21eb
commit 2db0e33f28

View file

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