Daniel García Aubert
cfdff61d08
Create map & template routers to skip unneeded middlewares in monitor endpoints
2018-04-04 15:52:54 +02:00
Daniel García Aubert
93bdbb1c50
Create monitor monitor router
2018-04-03 19:16:37 +02:00
Daniel García Aubert
f1e421db05
Create an api router isolated from heath checks
2018-04-03 19:08:56 +02:00
Daniel García Aubert
a21d7db390
Extract json-replacer
2018-04-03 13:21:41 +02:00
Daniel García Aubert
cc61a89c68
Remove function
2018-04-03 12:27:45 +02:00
Daniel García Aubert
3316c2ded3
Create logger middleware to encapsulate its configuration from app
2018-04-03 12:26:35 +02:00
Daniel García Aubert
b6989ac82a
Create a controllers factory where all collaborators are created and controllers are mounted afterwards
2018-04-02 19:02:31 +02:00
Daniel García Aubert
6bf06116df
Build controllers (analysis and server info) in server
2018-03-28 20:12:11 +02:00
Daniel García Aubert
5bb5bc42ee
Create Map Controller while building server
2018-03-28 19:58:30 +02:00
Daniel García Aubert
57e10a8d2b
Create layergroup controllers in server construction
2018-03-28 19:37:31 +02:00
Daniel García Aubert
51fade6bd3
Ensure each controller only receives one router
2018-03-28 19:11:19 +02:00
Daniel García Aubert
5b9f608667
Use express routers
2018-03-27 18:46:54 +02:00
Daniel García Aubert
cb488cbde8
Extract middleware served by host header
2018-03-26 19:53:33 +02:00
Daniel García Aubert
4bb35f5fab
Extract cors and user middlewares and set them up at application level
2018-03-26 15:37:44 +02:00
Daniel García Aubert
a142620b70
Make generic middlewares to calculate surrogate key and cache channel headers:
...
- In controllers: all reference to map config are now camelized, for instance: mapconfig -> mapConfig or mapconfigProvider -> mapConfigProvider
- In controllers: all map config providers created in req/res cycle are saved into `res.locals` and `mapConfigProvider` as key.
- In map-config-providers: all of them implement `.getAffectedTables()`, in order to calculate the tables involved for a given map-config. For that, `pgConnection` and `affectedTablesCache` are injected as constructor argument.
- Named Map Provider: rename references from `affectedTablesAndLastUpdate` to `affectedTables`.
- Named Map Provider Cache: In order to create new named map providers, needs affectedTablesCache.
- Extract locals middlewares (surrogate-key and cache-channel) from controllers and create an unified version of them.
- Extract last-modified middleware from named maps controller (draft).
2018-03-21 14:11:54 +01:00
Daniel García Aubert
2e13bc42a1
Merge branch 'master' into spread-prepare-context-middleware
2018-03-20 11:01:13 +01:00
Daniel García Aubert
7ff7b0c2d1
Extract rest of the middlewares from prepare contex
2018-03-15 19:38:11 +01:00
Daniel García Aubert
30dab7df9f
Extract authorize middeware form prepareContext
2018-03-15 18:48:29 +01:00
Daniel García Aubert
afff06c7e6
Extract db-conn-setup middleware for prepare-context
2018-03-15 15:33:20 +01:00
Simon Martín
48a7d28aa6
rate limit analysis catalog endpoint
2018-03-14 17:46:19 +01:00
Simon Martín
0e43c54214
Merge branch 'master' into rateLimits
2018-03-13 18:09:44 +01:00
Daniel García Aubert
da18506e41
Follow middleware factory pattern
2018-03-01 18:45:04 +01:00
Simon Martín
335d91b42d
separate rate limit logic from middleware and EVALSHA
2018-02-28 13:11:18 +01:00
Simon Martín
e6011287f4
adding middleware to layergroup controller
2018-02-20 11:25:16 +01:00
Daniel García Aubert
dab204ea71
Do not aggregate if rows cout is lower than threshold or the layer's sql has geometries distinct of points
2017-12-11 17:32:06 +01:00
Daniel García Aubert
f376a7cdd5
Use aggregation adapter before the overviews one
2017-12-01 17:05:01 +01:00
Daniel García Aubert
d01857923e
Plug aggregation mapconfig adapter
2017-11-30 19:31:00 +01:00
Daniel García Aubert
9ad6d0cbcc
Merge branch 'master' into stats-middleware
2017-10-16 15:06:20 +02:00
David Manzanares
d30f710534
Merge remote-tracking branch 'origin/master' into mvt-path-conf
2017-10-10 17:53:28 +02:00
Daniel García Aubert
a81e98995a
Merge branch 'middlewarify' into stats-middleware
2017-10-09 17:54:32 +02:00
Simon Martín
06138a82a8
Merge branch 'middlewarify' into res-locals
2017-10-05 17:53:15 +02:00
Simon Martín
2f310a15bd
do not overwrite creation of res.locals
2017-10-05 17:23:07 +02:00
Daniel García Aubert
bf637ccd5b
Implement stats middleware removing some duplicated code
2017-10-05 17:06:42 +02:00
Daniel García Aubert
b93c09959c
Back to use just one router
2017-10-05 12:12:21 +02:00
Simon Martín
21720267cf
from req.context to res.locals
2017-10-03 17:47:57 +02:00
David Manzanares
ad1abb28af
Add configuration flag to enable/disable direct PgSQL MVT
2017-09-28 12:08:22 +02:00
Daniel García Aubert
4600005a86
Bring ported test back
2017-09-26 17:31:57 +02:00
Daniel García Aubert
4899c7ffef
Inject prepare context middleware to controllers
2017-09-25 19:40:27 +02:00
Daniel García Aubert
8fd35849c7
Merge branch 'middlewarify' of github.com:CartoDB/Windshaft-cartodb into middlewarify
2017-09-22 17:15:41 +02:00
Simon
c09899913f
finishing integration of lzma middleware
2017-09-22 16:46:39 +02:00
Daniel García Aubert
0bdeee64a7
Use express router to group controllers' enpoints and reuse common middleware for named maps admin controller
2017-09-22 16:45:34 +02:00
Daniel García Aubert
ee8619c470
Use express router to group controllers' enpoints and reuse common middleware for analysis controller
2017-09-22 16:28:52 +02:00
Simon
9d81321d78
Merge branch 'master' into middlewarify
2017-09-22 16:26:56 +02:00
Simon Martín
ca63c2ef1a
Merge pull request #721 from CartoDB/lzma-middleware
...
Implement LZMA query param inflating as middleware
2017-09-22 16:16:36 +02:00
Daniel García Aubert
b0486f9bae
Use express router to group enpoints and reuse common middlewares for layergroup controller
2017-09-22 15:44:12 +02:00
Daniel García Aubert
daeae5d95c
Implement error-middleware to handle errors at top level
2017-09-21 11:46:42 +02:00
Raul Ochoa
e7c206762d
String comparison and regex to match errors instead of indexOf
2017-08-10 16:09:26 +02:00
Daniel García Aubert
14f85abd39
Merge branch 'master' into response-time-limit
2017-08-09 18:48:38 +02:00
Raul Ochoa
399561d076
Implement LZMA query param inflating as middleware
...
The req2params method is doing too many things,
this is an initial step to do fewer things in that method.
2017-08-04 17:30:46 +02:00
Daniel García Aubert
9258ad7ecc
Fix style typo
2017-08-01 12:56:03 +02:00