From 875f3c07b39940cc8e65e1f41e5381f9a2df8605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Thu, 22 Mar 2018 17:07:38 +0100 Subject: [PATCH] Pass only needed params to MapStoreMapConfigProvider --- lib/cartodb/controllers/layergroup.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index 28ac7103..614480a6 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -425,9 +425,15 @@ function createMapStoreMapConfigProvider ( forcedFormat = null ) { return function createMapStoreMapConfigProviderMiddleware (req, res, next) { - const { user } = res.locals; + const { user, token, cache_buster, api_key } = res.locals; + const { dbuser, dbname, dbpassword, dbhost, dbport } = res.locals; + const { layer, z, x, y, scale_factor, format } = req.params; - const params = getRequestParams(res.locals); + const params = { + user, token, cache_buster, api_key, + dbuser, dbname, dbpassword, dbhost, dbport, + layer, z, x, y, scale_factor, format + }; if (forcedFormat) { params.format = forcedFormat;