From ae8f16e64ab24e564420782ddc6f1a076d3776a3 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Wed, 26 May 2021 00:06:24 +0200 Subject: [PATCH] Add 4 hour cache --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c804dc3..0e53e55 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,8 @@ app.get('/characters/id/:charaId', async (req, res) => { res.writeHead(200, { 'Content-Type': 'image/png', - 'Content-Length': png.length + 'Content-Length': png.length, + 'Cache-Control': 'public, max-age=14400' }); res.end(png, 'binary'); }catch(error){ @@ -37,7 +38,8 @@ app.get('/characters/name/:world/:charName', async (req, res) => { res.writeHead(200, { 'Content-Type': 'image/png', - 'Content-Length': png.length + 'Content-Length': png.length, + 'Cache-Control': 'public, max-age=14400' }); res.end(png, 'binary'); }catch(error){