cloudcms-server 3.2.315 → 3.2.316

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -346,7 +346,7 @@ exports = module.exports = function()
346
346
  if (doesNotExist)
347
347
  {
348
348
  // are we being spoofed? kill the connection
349
- console.log("[BLACKLIST KILL: " + req.virtualHost + " > " + req.method + " " + req.url + "]");
349
+ res.blocked = true;
350
350
  res.writeHead(503, { 'Content-Type': 'application/json' });
351
351
  return res.end(JSON.stringify({"error": true, "message": "Bad Request."}));
352
352
  }
@@ -412,7 +412,7 @@ exports = module.exports = function()
412
412
  }
413
413
 
414
414
  // mark with sentinel (30 minutes)
415
- console.log("[BLACKLIST ADD: " + req.virtualHost + "]");
415
+ req.log("[BLACKLIST] Adding: " + req.virtualHost);
416
416
  process.driverConfigCache.write(req.virtualHost, SENTINEL_NOT_FOUND_VALUE, 30 * 60, function (err) {
417
417
  completionFunction(null, null, true);
418
418
  });
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "cloudcms-server",
8
8
  "description": "Cloud CMS Application Server Module",
9
- "version": "3.2.315",
9
+ "version": "3.2.316",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git://github.com/gitana/cloudcms-server.git"
package/server/index.js CHANGED
@@ -1023,8 +1023,16 @@ var startServer = function(config, startServerFinishedFn)
1023
1023
  requestPath = util.stripQueryStringFromUrl(requestPath);
1024
1024
  }
1025
1025
  }
1026
+
1027
+ var m = "";
1028
+ if (res.blocked)
1029
+ {
1030
+ m += "*BLOCKED* ";
1031
+ }
1032
+ m += req.method + " " + requestPath + " [" + res.statusCode + "]";
1033
+ m += " (" + time.toFixed(2) + " ms)";
1026
1034
 
1027
- req.log(req.method + " " + requestPath + " [" + res.statusCode + "] (" + time.toFixed(2) + " ms)", warn);
1035
+ req.log(m, warn);
1028
1036
  }));
1029
1037
 
1030
1038
  // set up CORS allowances