Merge branch 'staging' into oo2
This commit is contained in:
@@ -124,6 +124,12 @@ app.get(mainPagePattern, Express.static(__dirname + '/customize.dist'));
|
||||
app.use("/blob", Express.static(Path.join(__dirname, (config.blobPath || './blob')), {
|
||||
maxAge: DEV_MODE? "0d": "365d"
|
||||
}));
|
||||
app.use("/datastore", Express.static(Path.join(__dirname, (config.filePath || './datastore')), {
|
||||
maxAge: "0d"
|
||||
}));
|
||||
app.use("/block", Express.static(Path.join(__dirname, (config.blockPath || '/block')), {
|
||||
maxAge: "0d",
|
||||
}));
|
||||
|
||||
app.use("/customize", Express.static(__dirname + '/customize'));
|
||||
app.use("/customize", Express.static(__dirname + '/customize.dist'));
|
||||
@@ -160,7 +166,7 @@ app.get('/api/config', function(req, res){
|
||||
res.send('define(function(){\n' + [
|
||||
'var obj = ' + JSON.stringify({
|
||||
requireConf: {
|
||||
waitSeconds: 60,
|
||||
waitSeconds: 600,
|
||||
urlArgs: 'ver=' + Package.version + (FRESH_KEY? '-' + FRESH_KEY: '') + (DEV_MODE? '-' + (+new Date()): ''),
|
||||
},
|
||||
removeDonateButton: (config.removeDonateButton === true),
|
||||
@@ -189,6 +195,7 @@ var custom_four04_path = Path.resolve(__dirname + '/customize/404.html');
|
||||
var send404 = function (res, path) {
|
||||
if (!path && path !== four04_path) { path = four04_path; }
|
||||
Fs.exists(path, function (exists) {
|
||||
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||
if (exists) { return Fs.createReadStream(path).pipe(res); }
|
||||
send404(res);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user