mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Correct ca91c0c403
.
This commit is contained in:
parent
c0fc7f9b0c
commit
c1a903e32e
1 changed files with 4 additions and 3 deletions
|
@ -23,8 +23,9 @@ var zlib = require('zlib');
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
|
|
||||||
var ROOT_DIR = path.normalize(__dirname + "/../");
|
var ROOT_DIR = path.normalize(__dirname + "/../");
|
||||||
var CACHE_DIR = ROOT_DIR + '../var/';
|
var CACHE_DIR = path.normalize(ROOT_DIR + '../../var/');
|
||||||
CACHE_DIR = path.existsSync(CACHE_DIR) || undefined;
|
console.log(CACHE_DIR)
|
||||||
|
CACHE_DIR = path.existsSync(CACHE_DIR) ? CACHE_DIR : undefined;
|
||||||
|
|
||||||
var responseCache = {};
|
var responseCache = {};
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@ function CachingMiddleware() {
|
||||||
}
|
}
|
||||||
CachingMiddleware.prototype = new function () {
|
CachingMiddleware.prototype = new function () {
|
||||||
function handle(req, res, next) {
|
function handle(req, res, next) {
|
||||||
if (!(req.method == "GET" || req.method == "HEAD" || !CACHE_DIR)) {
|
if (!(req.method == "GET" || req.method == "HEAD") || !CACHE_DIR) {
|
||||||
return next(undefined, req, res);
|
return next(undefined, req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue