Commit Graph

238 Commits

Author SHA1 Message Date
Simon Martín
c94d782037 calling to new createAffectedTables 2018-04-06 13:00:12 +02:00
Daniel García Aubert
22fdc3d1bf Add query params when instantiating template 2018-03-28 15:53:34 +02:00
Daniel García Aubert
d3e2707fce Tidy middlewares up: put rate limit middleware after authorization 2018-03-23 17:55:41 +01:00
Daniel García Aubert
4cba4c7a1f Tidy middlewares up: cleanUpQeuryParams 2018-03-23 17:37:06 +01:00
Daniel García Aubert
3b1fd05940 Use layergroup token middleware where it's actually needed 2018-03-23 17:24:56 +01:00
Daniel García Aubert
516b1f765e Do not use middleware local in map controller 2018-03-23 16:08:52 +01:00
Daniel García Aubert
ebefba9e32 Revert: move map-config assignment 2018-03-23 10:57:35 +01:00
Daniel García Aubert
c31639ebbd Move assignments 2018-03-22 19:38:56 +01:00
Daniel García Aubert
4ff8d6fbc3 Pass only needed params to map backend 2018-03-22 19:37:08 +01:00
Daniel García Aubert
d029f81992 Pass only needed params to create layergroup map config provider 2018-03-22 19:36:42 +01:00
Daniel García Aubert
4f8c184bc0 Pass only needed params to map config adapter 2018-03-22 19:14:18 +01:00
Daniel García Aubert
afc608fc5d Pass only needed params to named map map config provider 2018-03-22 18:57:26 +01:00
Daniel García Aubert
52c8c9341a Remove function defined but never used 2018-03-21 16:40:09 +01:00
Daniel García Aubert
72c4a7abd6 Extract cache control header middleware 2018-03-21 16:38:37 +01:00
Daniel García Aubert
d022a1fa5e Extract last-modified header middlleware 2018-03-21 14:43:00 +01: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
df999e040c Merge branch 'spread-prepare-context-middleware' into unify-middlewares 2018-03-20 11:06:31 +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
9fd2519c12 Rename middleware 2018-03-20 09:34:50 +01:00
Daniel García Aubert
325bdfe92f Move middleware 2018-03-20 09:34:06 +01:00
Daniel García Aubert
9211fa065b Extract sendResponse middleware 2018-03-19 19:48:14 +01:00
Daniel García Aubert
8333b39928 Use res.body as placeholder of layergroup 2018-03-19 19:16:18 +01:00
Daniel García Aubert
7bdbd4cb03 Move variable declaration 2018-03-16 16:42:47 +01:00
Daniel García Aubert
313fc75ec8 Rename middleware 2018-03-16 16:28:50 +01:00
Daniel García Aubert
639a69a639 Reorder middlewares to optimize workflow 2018-03-16 16:12:36 +01:00
Daniel García Aubert
0aa8d63a6e Unifiy allowQueryParams and cleanUpQueryParams middlewares 2018-03-16 14:03:59 +01:00
Daniel García Aubert
7b11cdcb74 Use template string 2018-03-16 13:08:00 +01:00
Daniel García Aubert
071a5a4bdf Rename base paths 2018-03-16 13:04:42 +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
0e43c54214 Merge branch 'master' into rateLimits 2018-03-13 18:09:44 +01:00
Daniel García Aubert
01ed513a79 Use 'const' 2018-03-09 17:02:13 +01:00
Daniel García Aubert
504f68b8aa Missing semicolon 2018-03-09 16:18:33 +01:00
Daniel García Aubert
cbb08f5642 Extract function 2018-03-09 15:49:03 +01:00
Daniel García Aubert
02f93f3a14 Extract layergroup-metadata class 2018-03-09 12:58:05 +01:00
Daniel García Aubert
363cb0b679 Extract middlewares from map-controller class 2018-03-08 12:16:24 +01:00
Daniel García Aubert
d26910ba9c Extract checkJsonContentType middleware from MapController class 2018-03-07 19:11:03 +01:00
Daniel García Aubert
74b2f305ea Extract initProfiler middleware from map-controller 2018-03-07 19:09:52 +01:00
Simon Martín
1b18b2b188 changing endpointGroup var name 2018-03-02 20:55:50 +01:00
Simon Martín
dfdd2b9043 adding middlewares to composer in maps controller 2018-03-02 15:24:18 +01:00
Daniel García Aubert
b0c924ca03 Follow middleware pattern, should return a function as the actual middleware 2018-03-01 15:42:03 +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
254991c56c changing endpoint groups constant keys 2018-02-27 17:57:25 +01:00
Simon Martín
b0d63b2ec0 changing module exports and middleware name 2018-02-27 16:52:27 +01:00
Simon Martín
e061b3e631 adding rate limit middlewware to maps controller 2018-02-20 11:26:09 +01:00
Raul Ochoa
2cda43dc8d Promote https urls over http 2018-01-03 22:18:59 +00:00
Raul Ochoa
f7f513a61a Add urlTemplate URLs to metadata
This is useful when using client libraries like leaflet.
2018-01-03 20:53:03 +00:00
Raul Ochoa
060b93c314 Rename middleware fn name 2018-01-03 18:44:10 +00:00
Raul Ochoa
bf40b240d3 Return tilejson in metadata
It returns tilejson for each individual layer and also for all vector and raster layers.
2018-01-03 16:54:45 +01:00