Pass only needed params to MapStoreMapConfigProvider

This commit is contained in:
Daniel García Aubert
2018-03-22 17:07:38 +01:00
parent 8ce72ea842
commit 875f3c07b3
+8 -2
View File
@@ -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;