From 4ee4492490c6966e0fd5e37db41e0237b6ba5b2e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 9 Jan 2014 16:46:47 +0100 Subject: [PATCH] Yet another username extraction fix. Thanks again @demimismo. Closes #100 (yet again) --- lib/cartodb/server_options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index 786aac0d..957deb66 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -281,7 +281,7 @@ module.exports = function(){ sql = sql.join(';'); var dbName = req.params.dbname; - var usr = req.headers.host.split('.')[0]; + var usr = this.userByReq(req); var key = req.params.map_key; var cacheKey = dbName + ':' + token;