From 1e52f790ad68e04ea24a4ebdcbc90d2ff92cb71b Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Fri, 10 Jul 2015 11:25:20 +0200 Subject: [PATCH] One pass for prepare request and response objects --- lib/cartodb/server.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/cartodb/server.js b/lib/cartodb/server.js index 46f5aeab..007b2135 100644 --- a/lib/cartodb/server.js +++ b/lib/cartodb/server.js @@ -811,17 +811,13 @@ function bootstrap(opts) { app.enable('jsonp callback'); app.use(express.bodyParser()); - app.use(function createRequestContext(req, res, next) { + app.use(function bootstrap$prepareRequestResponse(req, res, next) { req.context = req.context || {}; - next(); - }); - - // Use our step-profiler - app.use(function(req, res, next) { req.profiler = new windshaft.stats.Profiler({ statsd_client: global.statsClient, profile: opts.useProfiler }); + res.removeHeader('x-powered-by'); next(); });