From 2db0e33f28c786a0e04284bd60c75b74eec76941 Mon Sep 17 00:00:00 2001 From: Matt Dunn-Rankin Date: Thu, 30 Apr 2020 00:18:01 -0700 Subject: [PATCH] forward Cache-Control response header too! --- api/assetProxy.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api/assetProxy.js b/api/assetProxy.js index d2ba266..5ed22ce 100644 --- a/api/assetProxy.js +++ b/api/assetProxy.js @@ -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); };