Bugfix to not have server required anywhere as it causes problems for command line script usage of modules
This commit is contained in:
parent
a5366a0a16
commit
dbdc53307e
|
@ -51,5 +51,8 @@
|
|||
// "httpAuth" : "user:pass",
|
||||
|
||||
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
|
||||
"loglevel": "INFO"
|
||||
"loglevel": "INFO",
|
||||
|
||||
/* cache 6 hours = 1000*60*60*6 */
|
||||
"maxAge": 21600000
|
||||
}
|
||||
|
|
|
@ -40,5 +40,9 @@
|
|||
|
||||
/* This is the path to the Abiword executable. Setting it to null, disables abiword.
|
||||
Abiword is needed to enable the import/export of pads*/
|
||||
"abiword" : null
|
||||
"abiword" : null,
|
||||
|
||||
/* cache 6 hours = 1000*60*60*6 */
|
||||
"maxAge": 21600000
|
||||
|
||||
}
|
||||
|
|
|
@ -51,9 +51,6 @@ console.log("Report bugs at https://github.com/Pita/etherpad-lite/issues")
|
|||
|
||||
var serverName = "Etherpad-Lite " + version + " (http://j.mp/ep-lite)";
|
||||
|
||||
//cache 6 hours
|
||||
exports.maxAge = 1000*60*60*6;
|
||||
|
||||
//set loglevel
|
||||
log4js.setGlobalLogLevel(settings.loglevel);
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ var pro = require("uglify-js").uglify;
|
|||
var path = require('path');
|
||||
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
||||
var RequireKernel = require('require-kernel');
|
||||
var server = require('../server');
|
||||
|
||||
var ROOT_DIR = path.normalize(__dirname + "/../../static/");
|
||||
var TAR_PATH = path.join(__dirname, 'tar.json');
|
||||
|
@ -109,10 +108,10 @@ exports.minify = function(req, res, next)
|
|||
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);
|
||||
if (settings.maxAge) {
|
||||
var expiresDate = new Date((new Date()).getTime()+settings.maxAge*1000);
|
||||
res.setHeader('expires', expiresDate.toUTCString());
|
||||
res.setHeader('cache-control', 'max-age=' + server.maxAge);
|
||||
res.setHeader('cache-control', 'max-age=' + settings.maxAge);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ var async = require('async');
|
|||
var Buffer = require('buffer').Buffer;
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var server = require('../server');
|
||||
var zlib = require('zlib');
|
||||
var util = require('util');
|
||||
var settings = require('./Settings');
|
||||
|
|
Loading…
Reference in New Issue