From 9a52edacb2a7ac56659af060bb490e34e6956c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 11 Apr 2018 16:00:14 +0200 Subject: [PATCH] Add routes configuration to config example files --- config/environments/development.js.example | 34 ++++++++++++++++++++++ config/environments/production.js.example | 34 ++++++++++++++++++++++ config/environments/staging.js.example | 34 ++++++++++++++++++++++ 3 files changed, 102 insertions(+) diff --git a/config/environments/development.js.example b/config/environments/development.js.example index 12de0912..95711dad 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -13,6 +13,8 @@ var config = { // from hostname. Must have a single grabbing block. ,user_from_host: '^(.*)\\.localhost' + // DEPRECATED: use routes property instead + // --------------------------------------- // Base URLs for the APIs // // See http://github.com/CartoDB/Windshaft-cartodb/wiki/Unified-Map-API @@ -26,6 +28,38 @@ var config = { // "tiles/layergroup" is for compatibility with versions up to 1.6.x ,base_url_detached: '(?:/api/v1/map|/user/:user/api/v1/map|/tiles/layergroup)' + // Base URLs for the APIs + // + // See https://github.com/CartoDB/Windshaft-cartodb/wiki/Unified-Map-API + ,routes: { + api: { + // "/tiles" is for compatibility with versions up to 1.6.x + paths: [ + '/api/v1', + '/user/:user/api/v1', + '/tiles' // for compatibility with versions up to 1.6.x + ], + // Base url for the Detached Maps API + // "maps" is the the new API, + // "tiles/layergroup" is for compatibility with versions up to 1.6.x + map: { + paths: [ + '/map', + '/layergroup' + ] + }, + // Base url for the Templated Maps API + // "/api/v1/map/named" is the new API, + // "/tiles/template" is for compatibility with versions up to 1.6.x + template: { + paths: [ + '/map/named', + '/template' + ] + } + } + } + // Resource URLs expose endpoints to request/retrieve metadata associated to Maps: dataviews, analysis node status. // // This URLs depend on how `base_url_detached` and `user_from_host` are configured: the application can be diff --git a/config/environments/production.js.example b/config/environments/production.js.example index beb9f15c..7b552507 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -13,6 +13,8 @@ var config = { // from hostname. Must have a single grabbing block. ,user_from_host: '^(.*)\\.cartodb\\.com$' + // DEPRECATED: use routes property instead + // --------------------------------------- // Base URLs for the APIs // // See http://github.com/CartoDB/Windshaft-cartodb/wiki/Unified-Map-API @@ -26,6 +28,38 @@ var config = { // "tiles/layergroup" is for compatibility with versions up to 1.6.x ,base_url_detached: '(?:/api/v1/map|/user/:user/api/v1/map|/tiles/layergroup)' + // Base URLs for the APIs + // + // See https://github.com/CartoDB/Windshaft-cartodb/wiki/Unified-Map-API + ,routes: { + api: { + // "/tiles" is for compatibility with versions up to 1.6.x + paths: [ + '/api/v1', + '/user/:user/api/v1', + '/tiles' // for compatibility with versions up to 1.6.x + ], + // Base url for the Detached Maps API + // "maps" is the the new API, + // "tiles/layergroup" is for compatibility with versions up to 1.6.x + map: { + paths: [ + '/map', + '/layergroup' + ] + }, + // Base url for the Templated Maps API + // "/api/v1/map/named" is the new API, + // "/tiles/template" is for compatibility with versions up to 1.6.x + template: { + paths: [ + '/map/named', + '/template' + ] + } + } + } + // Resource URLs expose endpoints to request/retrieve metadata associated to Maps: dataviews, analysis node status. // // This URLs depend on how `base_url_detached` and `user_from_host` are configured: the application can be diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index 40d3bb8b..29c15781 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -13,6 +13,8 @@ var config = { // from hostname. Must have a single grabbing block. ,user_from_host: '^(.*)\\.cartodb\\.com$' + // DEPRECATED: use routes property instead + // --------------------------------------- // Base URLs for the APIs // // See http://github.com/CartoDB/Windshaft-cartodb/wiki/Unified-Map-API @@ -26,6 +28,38 @@ var config = { // "/tiles/layergroup" is for compatibility with versions up to 1.6.x ,base_url_detached: '(?:/api/v1/map|/user/:user/api/v1/map|/tiles/layergroup)' + // Base URLs for the APIs + // + // See https://github.com/CartoDB/Windshaft-cartodb/wiki/Unified-Map-API + ,routes: { + api: { + // "/tiles" is for compatibility with versions up to 1.6.x + paths: [ + '/api/v1', + '/user/:user/api/v1', + '/tiles' // for compatibility with versions up to 1.6.x + ], + // Base url for the Detached Maps API + // "maps" is the the new API, + // "tiles/layergroup" is for compatibility with versions up to 1.6.x + map: { + paths: [ + '/map', + '/layergroup' + ] + }, + // Base url for the Templated Maps API + // "/api/v1/map/named" is the new API, + // "/tiles/template" is for compatibility with versions up to 1.6.x + template: { + paths: [ + '/map/named', + '/template' + ] + } + } + } + // Resource URLs expose endpoints to request/retrieve metadata associated to Maps: dataviews, analysis node status. // // This URLs depend on how `base_url_detached` and `user_from_host` are configured: the application can be