Commit Graph

132 Commits

Author SHA1 Message Date
Daniel García Aubert
6c466d13ff Typo 2018-04-17 11:36:33 +02:00
Daniel García Aubert
9905b20448 Improve naming 2018-04-17 11:22:05 +02:00
Daniel García Aubert
8000a51918 Improve error messages 2018-04-17 11:04:03 +02:00
Daniel García Aubert
98d15e2e34 Typo 2018-04-16 18:57:28 +02:00
Daniel García Aubert
d5c591317b Add coordinates validation to specific endpoints 2018-04-16 18:55:42 +02:00
Daniel García Aubert
5f906e54e4 Merge branch 'master' into 903-locals-refactor 2018-03-27 15:44:54 +02:00
Daniel
f2a7953d9d
Merge pull request #915 from CartoDB/unify-headers-middlewared
Unify headers middlewares
2018-03-27 12:38:23 +02:00
Daniel García Aubert
f231dc13cf Merge branch 'master' into unify-middlewares 2018-03-27 10:41:35 +02: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
5bc5c0ae86 Remove locals middleware 2018-03-23 16:53:00 +01:00
Daniel García Aubert
f76606bc26 Do not use locals middleware in layergroup controller 2018-03-23 14:13:27 +01:00
Simon Martín
f19eeff899 returning error mvt on rate limit 2018-03-23 13:30:47 +01:00
Simon Martín
609bf13765 correct error message in rate limit 2018-03-23 11:42:53 +01:00
Simon Martín
fb784d6a91 removing retry after when no necessary 2018-03-23 10:23:57 +01:00
Daniel García Aubert
672b19b106 Magic number 2018-03-21 16:48:21 +01:00
Daniel García Aubert
4a2580c9ea Missing semicolon 2018-03-21 16:43:34 +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
9211fa065b Extract sendResponse middleware 2018-03-19 19:48:14 +01:00
Daniel García Aubert
639a69a639 Reorder middlewares to optimize workflow 2018-03-16 16:12:36 +01:00
Daniel García Aubert
67d2d2fe95 Use spread operator 2018-03-16 14:20:41 +01:00
Daniel García Aubert
0aa8d63a6e Unifiy allowQueryParams and cleanUpQueryParams middlewares 2018-03-16 14:03:59 +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
cbfeb0158e adding type and subtype to rate limit error 2018-03-14 17:27:59 +01:00
Simon Martín
e1a2c45b19 Headers following rfc6648 2018-03-14 12:09:20 +01:00
Simon Martín
0e43c54214 Merge branch 'master' into rateLimits 2018-03-13 18:09:44 +01:00
Eneko Lakasta
5ad1e1b645 merge master 2018-03-12 11:52:38 +01:00
Eneko Lakasta
b0eacb2a79 add vary header to honor authorization header when caching 2018-03-06 12:46:38 +01:00
Simon Martín
a2bf235553 Merge branch 'master' into rateLimits 2018-03-02 21:21:10 +01:00
Simon Martín
bf267e9c95 fix checking rate limit enabled 2018-03-02 15:48:31 +01:00
Simon Martín
843f70cdba interchange var and middlewware names 2018-03-02 15:35:38 +01:00
Simon Martín
42e0e07c14 refactoring rate limit middleware 2018-03-02 15:33:50 +01:00
Simon Martín
67b2343571 fix existing var name 2018-03-01 15:50:20 +01:00
Simon Martín
335d91b42d separate rate limit logic from middleware and EVALSHA 2018-02-28 13:11:18 +01:00
Daniel García Aubert
102b11b1b5 Follow middleware naming convention 2018-02-28 13:10:46 +01:00
Simon Martín
254991c56c changing endpoint groups constant keys 2018-02-27 17:57:25 +01:00
Simon Martín
a492ab0143 improving naming 2018-02-27 17:36:03 +01:00
Simon Martín
b0d63b2ec0 changing module exports and middleware name 2018-02-27 16:52:27 +01:00
Simon Martín
85b0c63eb0 destructuring array assignment 2018-02-27 16:24:30 +01:00
Simon Martín
98a92f51e6 make jshint happy 2018-02-26 17:17:01 +01:00
Eneko Lakasta
8867cdbc02 use anonymous function instead of arrow function in middleware export to don't bind this 2018-02-26 15:57:42 +01:00
Simon Martín
f03ee4b836 removing hardcoded user 2018-02-26 11:20:31 +01:00
Simon Martín
90418b204e getLowerRateLimit tests 2018-02-26 10:51:51 +01:00
Simon Martín
918674e01a changing endpoint groups names 2018-02-23 21:09:27 +01:00