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
Daniel García Aubert
55dd049812
Be able to skip aggregation to create a layergroup with aggregation defined already
2017-12-05 12:59:32 +01:00
Daniel García Aubert
077f19d506
Integrate aggregation and get metadata for layergroup
2017-12-04 12:40:53 +01:00
Daniel García Aubert
6f59c61c8b
Add more steps while profiling
2017-11-08 14:27:35 +01:00
Daniel García Aubert
aff5fcda63
Add namespace for getMapConfig step while profiling
2017-11-08 14:08:27 +01:00
Daniel García Aubert
56d33b7f5b
Add profiling
2017-11-08 10:52:25 +01:00
Daniel García Aubert
c48e89826d
Split middleware to follow SRP
2017-11-07 09:50:52 +01:00
Daniel García Aubert
693a2e7bee
Order middlewares
2017-11-05 19:13:56 +01:00
Daniel García Aubert
f9ba3c41d3
Create new middlewares to init profiling and another to check JSON content-type
2017-11-05 18:55:23 +01:00
Daniel García Aubert
46289f27df
Remove TODO
2017-11-03 15:26:25 +01:00
Daniel García Aubert
05ccf20634
Rename function
2017-11-03 15:12:18 +01:00
Daniel García Aubert
6acb873d95
Enforce all middlewares to follow the same constructor pattern
2017-11-03 15:06:15 +01:00