Merge pull request #243 from CartoDB/retina-support

Retina support for mapnik layers
This commit is contained in:
Raul Ochoa 2015-01-15 17:33:54 +01:00
commit 1880b5d261
4 changed files with 33 additions and 14 deletions

View File

@ -1,6 +1,9 @@
1.23.2 -- 2015-mm-dd
1.24.0 -- 2015-mm-dd
--------------------
Announcements:
- Upgrades windshaft to 0.34.0 for retina support
1.23.1 -- 2015-01-14
--------------------

View File

@ -15,6 +15,24 @@ if ( _.isUndefined(global.environment.sqlapi.domain) ) {
}
}
// Whitelist query parameters and attach format
var REQUEST_QUERY_PARAMS_WHITELIST = [
'sql',
'geom_type',
'cache_buster',
'cache_policy',
'callback',
'interactivity',
'map_key',
'api_key',
'auth_token',
'style',
'style_version',
'style_convert',
'config',
'scale_factor'
];
module.exports = function(redisPool) {
var redisOpts = redisPool ? {pool: redisPool} : global.environment.redis;
var cartoData = require('cartodb-redis')(redisOpts),
@ -659,9 +677,7 @@ module.exports = function(redisPool) {
return;
}
// Whitelist query parameters and attach format
var good_query = ['sql', 'geom_type', 'cache_buster', 'cache_policy', 'callback', 'interactivity', 'map_key', 'api_key', 'auth_token', 'style', 'style_version', 'style_convert', 'config' ];
var bad_query = _.difference(_.keys(req.query), good_query);
var bad_query = _.difference(_.keys(req.query), REQUEST_QUERY_PARAMS_WHITELIST);
_.each(bad_query, function(key){ delete req.query[key]; });
req.params = _.extend({}, req.params); // shuffle things as request is a strange array/object

16
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{
"name": "windshaft-cartodb",
"version": "1.23.2",
"version": "1.24.0",
"dependencies": {
"cartodb-psql": {
"version": "0.4.0",
@ -176,9 +176,9 @@
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz"
},
"windshaft": {
"version": "0.33.0",
"from": "https://github.com/CartoDB/Windshaft/tarball/0.33.0",
"resolved": "https://github.com/CartoDB/Windshaft/tarball/0.33.0",
"version": "0.34.0",
"from": "https://github.com/CartoDB/Windshaft/tarball/0.34.0",
"resolved": "https://github.com/CartoDB/Windshaft/tarball/0.34.0",
"dependencies": {
"chronograph": {
"version": "0.1.0",
@ -369,9 +369,9 @@
"resolved": "https://registry.npmjs.org/srs/-/srs-0.4.6.tgz",
"dependencies": {
"nan": {
"version": "1.4.1",
"version": "1.4.3",
"from": "nan@~1.4.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-1.4.1.tgz"
"resolved": "https://registry.npmjs.org/nan/-/nan-1.4.3.tgz"
},
"node-pre-gyp": {
"version": "0.6.1",
@ -788,9 +788,9 @@
"resolved": "https://registry.npmjs.org/zipfile/-/zipfile-0.5.5.tgz",
"dependencies": {
"nan": {
"version": "1.4.1",
"version": "1.4.3",
"from": "nan@~1.4.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-1.4.1.tgz"
"resolved": "https://registry.npmjs.org/nan/-/nan-1.4.3.tgz"
},
"node-pre-gyp": {
"version": "0.6.1",

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "windshaft-cartodb",
"version": "1.23.2",
"version": "1.24.0",
"description": "A map tile server for CartoDB",
"keywords": [
"cartodb"
@ -25,7 +25,7 @@
"node-varnish": "https://github.com/Vizzuality/node-varnish/tarball/0.3.0",
"underscore" : "~1.6.0",
"dot": "~1.0.2",
"windshaft": "https://github.com/CartoDB/Windshaft/tarball/0.33.0",
"windshaft": "https://github.com/CartoDB/Windshaft/tarball/0.34.0",
"step": "~0.0.5",
"request": "~2.9.203",
"cartodb-redis": "https://github.com/CartoDB/node-cartodb-redis/tarball/0.11.0",