summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwebserver.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/webserver.js b/webserver.js
index 89585c3..3815e42 100755
--- a/webserver.js
+++ b/webserver.js
@@ -39,24 +39,23 @@ function refreshWhatpulse(){
setInterval(refreshWhatpulse,6*3600*1000); //every 6 hours
refreshWhatpulse();
-function simpleLogEscape(str){
- return str
- .replace(/\\/g,"\\\\")
- .replace(/\n/g,"\\n")
- .replace(/ /g,"\\_");
-}
-
-app.use(function(req,res,next){
- var line=simpleLogEscape(req.ip)+" "+
- simpleLogEscape(req.method)+" "+
- simpleLogEscape(req.protocol)+" "+
- simpleLogEscape(req.hostname)+" "+
- simpleLogEscape(req.url);
- if(req.headers["dnt"])line+=" dnt="+simpleLogEscape(req.headers["dnt"]);
- if(req.headers["referer"])line+=" referer="+simpleLogEscape(req.headers["referer"]);
- reqlogger.log(line);
- next();
-});
+// function simpleLogEscape(str){
+// return str
+// .replace(/\\/g,"\\\\")
+// .replace(/\n/g,"\\n")
+// .replace(/ /g,"\\_");
+// }
+
+// app.use(function(req,res,next){
+// var line=simpleLogEscape(req.ip)+" "+
+// simpleLogEscape(req.method)+" "+
+// simpleLogEscape(req.hostname)+" "+
+// simpleLogEscape(req.url);
+// if(req.headers["dnt"])line+=" dnt="+simpleLogEscape(req.headers["dnt"]);
+// if(req.headers["referer"])line+=" referer="+simpleLogEscape(req.headers["referer"]);
+// reqlogger.log(line);
+// next();
+// });
/*app.use(function (req, res, next) {
console.log(req.subdomains);