Commit Graph

82 Commits

Author SHA1 Message Date
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
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
Daniel García Aubert
102b11b1b5 Follow middleware naming convention 2018-02-28 13:10:46 +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
Eneko Lakasta
59ca00b33b move apikey credentials getter to middleware file 2018-02-20 12:31:36 +01:00
Daniel García Aubert
7c7d606aa7 Remove trailing spaces 2018-02-19 19:05:13 +01:00
Eneko Lakasta
cda2616a8a get and check api key credentials from api key: username and token 2018-02-15 17:49:47 +01:00
Eneko Lakasta
3e916c6054 check if req.query exist before getting req.query.api_key/map_key 2018-02-15 15:20:05 +01:00
Eneko Lakasta
fc420c2c0f use for compatibility res.locals.api_key instead of res.locals.apikeyToken 2018-02-15 15:19:09 +01:00
Eneko Lakasta
5db0e9c8d8 add middleware for apikeyToken 2018-02-15 12:50:42 +01:00
Eneko Lakasta
b82d26527a remove comment 2018-02-08 12:35:44 +01:00
Simon Martín
77f64bee8c stringifyForLogs more usual case first 2017-12-18 14:54:36 +01:00
Simon Martín
14e90a6c76 add line at EOF 2017-12-18 12:59:44 +01:00
Simon Martín
a46f7b3099 nested options and using it 2017-12-18 12:34:56 +01:00
Simon Martín
cb7fb97a13 escape chars function 2017-12-18 11:14:27 +01:00
Simon Martín
e0d4a9e596 change funcion name 2017-11-30 15:04:07 +01:00
Simon Martín
555d3f558c changing error log structure 2017-11-28 18:22:55 +01:00
Simon Martín
386d6bfea8 removing unneeded check 2017-11-28 18:19:28 +01:00
Simon Martín
a007fce913 ensuring vars 2017-11-28 16:02:12 +01:00
Simon Martín
605d7057c9 fix copying array of errors and adding error.label to logs 2017-11-27 18:12:44 +01:00
Simon Martín
e7b8d9b223 moving logErrors to right position 2017-11-27 16:55:11 +01:00
Simon Martín
e041b5b8a9 removing ~lost space 2017-11-27 16:52:19 +01:00
Simon Martín
9a8f72b8db format details 2017-11-27 16:47:45 +01:00
Simon Martín
667925c455 adding error name, ensuring data and moving errors copy 2017-11-27 16:43:04 +01:00
Simon Martín
f24217a400 cloning object and removing logs 2017-11-24 18:06:17 +01:00
Simon Martín
84fd01535c adding errors to errors header 2017-11-24 17:53:07 +01:00
Simon Martín
0aaafa2068 Merge branch 'master' into res-locals-user 2017-11-16 11:03:43 +01:00
Simon Martín
667b2a9cb1 removing underscore dependency in locals middleware 2017-11-15 16:56:21 +01:00
Simon Martín
298882f410 remove with spaces and adding line as EOF 2017-11-15 15:07:30 +01:00
Simon Martín
0bf36fa058 remove unneeded encoding control 2017-11-07 16:02:37 +01:00
Simon Martín
1ea4fc50c9 make jshint happy 2017-11-07 11:17:32 +01:00
Simon Martín
216c877f4b verctor error middleware 2017-11-07 11:07:38 +01:00
Simon Martín
c0df0d12c6 ensure dont overwrite data in copy from req.params to res.locals 2017-10-20 17:21:55 +02:00
Daniel García Aubert
a81e98995a Merge branch 'middlewarify' into stats-middleware 2017-10-09 17:54:32 +02:00
Simon Martín
e3405ea2fc doing changes after merge with middlewarify 2017-10-09 12:27:58 +02:00
Simon Martín
5c0f597cbb Merge branch 'middlewarify' into res-locals 2017-10-09 10:55:43 +02:00
Daniel García Aubert
7289394f6a Missing EOL 2017-10-07 19:16:15 +02:00
Daniel García Aubert
1ba1c488fa Do not decorate response methods to set header and send stats 2017-10-07 19:02:26 +02:00
Daniel García Aubert
242e63716f Merge branch 'middlewarify' into stats-middleware 2017-10-05 18:21:02 +02:00
Daniel García Aubert
c70b8cb5bf Set X-Served-By-DB-Host header in db-conn-setup middleware 2017-10-05 18:05:46 +02:00
Simon Martín
06138a82a8 Merge branch 'middlewarify' into res-locals 2017-10-05 17:53:15 +02:00
Daniel García Aubert
678fbb1c8f Remove bad argument to middleware callback 2017-10-05 17:28:41 +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