From 427099acf6cb045cec77f7a73a83cd55de9be8e0 Mon Sep 17 00:00:00 2001 From: jrtechs Date: Mon, 16 Jul 2018 20:30:29 -0400 Subject: [PATCH] Fixed small bug with hashing of images for ETag --- img/image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/img/image.js b/img/image.js index 1002ba1..086aec2 100644 --- a/img/image.js +++ b/img/image.js @@ -17,7 +17,7 @@ module.exports= { utils.include("." + fileName).then(function(content) { - var eTag = crypto.createHash('md5').update(img).digest('hex'); + var eTag = crypto.createHash('md5').update(content).digest('hex'); result.writeHead(200, {'Content-Type': 'image/png', 'Cache-Control': 'public, max-age=2678400', 'ETag': '"' + eTag + '"'}); result.write(content); result.end();