From 0a31dabcd62f7d55cc208a0520c9ea433c6ff2ec Mon Sep 17 00:00:00 2001 From: Martijn Walraven Date: Thu, 7 Jan 2016 13:56:45 +0100 Subject: [PATCH] Don't set Last-Modified based on the file date If we serve files with a Last-Modified based on the file date, this interferes with content-based cache validation using ETag because clients are required to take both into account. --- packages/webapp/webapp_server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 6130237587..1e8b78d18d 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -405,7 +405,8 @@ WebAppInternals.staticFilesMiddleware = function (staticFiles, req, res, next) { } else { send(req, info.absolutePath, { maxage: maxAge, - dotfiles: 'allow' // if we specified a dotfile in the manifest, serve it + dotfiles: 'allow', // if we specified a dotfile in the manifest, serve it + lastModified: false // don't set last-modified based on the file date }).on('error', function (err) { Log.error("Error serving static file " + err); res.writeHead(500);