Browse Source

Fixed small bug with hashing of images for ETag

pull/4/head
jrtechs 6 years ago
parent
commit
427099acf6
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      img/image.js

+ 1
- 1
img/image.js View File

@ -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();

Loading…
Cancel
Save