Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
"hyperjson": "~1.4.0",
|
"hyperjson": "~1.4.0",
|
||||||
"chainpad-crypto": "^0.1.8",
|
"chainpad-crypto": "^0.1.8",
|
||||||
"chainpad-listmap": "^0.5.0",
|
"chainpad-listmap": "^0.5.0",
|
||||||
"chainpad": "^5.0.0",
|
"chainpad": "^5.1.0",
|
||||||
"chainpad-netflux": "^0.7.0",
|
"chainpad-netflux": "^0.7.0",
|
||||||
"file-saver": "1.3.1",
|
"file-saver": "1.3.1",
|
||||||
"alertifyjs": "1.0.11",
|
"alertifyjs": "1.0.11",
|
||||||
|
|||||||
@@ -75,6 +75,12 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /blob/ {
|
location ^~ /blob/ {
|
||||||
|
add_header Cache-Control max-age=31536000;
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ^~ /datastore/ {
|
||||||
|
add_header Cache-Control max-age=0;
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,9 @@ app.get(mainPagePattern, Express.static(__dirname + '/customize.dist'));
|
|||||||
app.use("/blob", Express.static(Path.join(__dirname, (config.blobPath || './blob')), {
|
app.use("/blob", Express.static(Path.join(__dirname, (config.blobPath || './blob')), {
|
||||||
maxAge: DEV_MODE? "0d": "365d"
|
maxAge: DEV_MODE? "0d": "365d"
|
||||||
}));
|
}));
|
||||||
|
app.use("/datastore", Express.static(Path.join(__dirname, (config.filePath || './datastore')), {
|
||||||
|
maxAge: "0d"
|
||||||
|
}));
|
||||||
|
|
||||||
app.use("/customize", Express.static(__dirname + '/customize'));
|
app.use("/customize", Express.static(__dirname + '/customize'));
|
||||||
app.use("/customize", Express.static(__dirname + '/customize.dist'));
|
app.use("/customize", Express.static(__dirname + '/customize.dist'));
|
||||||
@@ -188,6 +191,7 @@ var custom_four04_path = Path.resolve(__dirname + '/customize/404.html');
|
|||||||
var send404 = function (res, path) {
|
var send404 = function (res, path) {
|
||||||
if (!path && path !== four04_path) { path = four04_path; }
|
if (!path && path !== four04_path) { path = four04_path; }
|
||||||
Fs.exists(path, function (exists) {
|
Fs.exists(path, function (exists) {
|
||||||
|
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||||
if (exists) { return Fs.createReadStream(path).pipe(res); }
|
if (exists) { return Fs.createReadStream(path).pipe(res); }
|
||||||
send404(res);
|
send404(res);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user