mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Minify specifies maxAge.
This commit is contained in:
parent
1fe9d2a21e
commit
43f4184e8d
1 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,11 @@ function _handle(req, res, jsFilename, jsFiles) {
|
|||
date = new Date(date);
|
||||
res.setHeader('last-modified', date.toUTCString());
|
||||
res.setHeader('date', (new Date()).toUTCString());
|
||||
if (server.maxAge) {
|
||||
var expiresDate = new Date((new Date()).getTime() + server.maxAge*1000);
|
||||
res.setHeader('expires', expiresDate.toUTCString());
|
||||
res.setHeader('cache-control', 'max-age=' + server.maxAge);
|
||||
}
|
||||
|
||||
fs.stat(JS_DIR + jsFiles[0], function (error, stats) {
|
||||
if (error) {
|
||||
|
|
Loading…
Reference in a new issue