diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index 8033f654..962f4acb 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -55,35 +55,40 @@ module.exports = LayergroupController; LayergroupController.prototype.register = function(app) { - app.get(app.base_url_mapconfig + '/:token/:z/:x/:y@:scale_factor?x.:format', + app.get( + app.base_url_mapconfig + '/:token/:z/:x/:y@:scale_factor?x.:format', cors(), userMiddleware, this.req2paramsMiddleware, this.tile.bind(this) ); - app.get(app.base_url_mapconfig + '/:token/:z/:x/:y.:format', + app.get( + app.base_url_mapconfig + '/:token/:z/:x/:y.:format', cors(), userMiddleware, this.req2paramsMiddleware, this.tile.bind(this) ); - app.get(app.base_url_mapconfig + '/:token/:layer/:z/:x/:y.(:format)', + app.get( + app.base_url_mapconfig + '/:token/:layer/:z/:x/:y.(:format)', cors(), userMiddleware, this.req2paramsMiddleware, this.layer.bind(this) ); - app.get(app.base_url_mapconfig + '/:token/:layer/attributes/:fid', + app.get( + app.base_url_mapconfig + '/:token/:layer/attributes/:fid', cors(), userMiddleware, this.req2paramsMiddleware, this.attributes.bind(this) ); - app.get(app.base_url_mapconfig + '/static/center/:token/:z/:lat/:lng/:width/:height.:format', + app.get( + app.base_url_mapconfig + '/static/center/:token/:z/:lat/:lng/:width/:height.:format', cors(), userMiddleware, allowQueryParams(['layer']), @@ -91,7 +96,8 @@ LayergroupController.prototype.register = function(app) { this.center.bind(this) ); - app.get(app.base_url_mapconfig + '/static/bbox/:token/:west,:south,:east,:north/:width/:height.:format', + app.get( + app.base_url_mapconfig + '/static/bbox/:token/:west,:south,:east,:north/:width/:height.:format', cors(), userMiddleware, allowQueryParams(['layer']),