Set Last-Modified header to allow for 304 responses
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
1.3.3
|
||||
------
|
||||
* Set Last-Modified header to allow for 304 responses
|
||||
|
||||
1.3.2
|
||||
------
|
||||
|
||||
@@ -215,10 +215,17 @@ module.exports = function(){
|
||||
res.header('Cache-Control', 'public,max-age=31536000'); // 1 year
|
||||
} else {
|
||||
var ttl = global.environment.varnish.ttl || 86400;
|
||||
res.header('Last-Modified', new Date().toUTCString());
|
||||
res.header('Cache-Control', 'no-cache,max-age='+ttl+',must-revalidate, public');
|
||||
}
|
||||
|
||||
// Set Last-Modified header
|
||||
//
|
||||
// Currently sets it to NOW
|
||||
//
|
||||
// TODO: find out a real value, querying for most recent change in
|
||||
// any of the source tables
|
||||
res.header('Last-Modified', new Date().toUTCString());
|
||||
|
||||
me.generateCacheChannel(req, function(err, channel){
|
||||
if ( ! err ) {
|
||||
res.header('X-Cache-Channel', channel);
|
||||
|
||||
Reference in New Issue
Block a user