Skip to content

Commit

Permalink
Don't set Last-Modified based on the file date
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martijnwalraven committed Jan 8, 2016
1 parent b8a17dd commit 0a31dab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/webapp/webapp_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0a31dab

Please sign in to comment.