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.
This commit is contained in:
Martijn Walraven
2016-01-07 13:56:45 +01:00
parent b8a17dd97f
commit 0a31dabcd6

View File

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