Simon Martín
667b2a9cb1
removing underscore dependency in locals middleware
2017-11-15 16:56:21 +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
Simon Martín
1f03a6b181
using res.locals instead of params in AuthApi
2017-10-05 11:28:41 +02:00
Simon Martín
21720267cf
from req.context to res.locals
2017-10-03 17:47:57 +02:00
Simon Martín
3ce10690d6
send res.locals instead of res when possible
2017-10-03 13:06:12 +02:00
Simon Martín
6bfc5d8891
fix function name and removing comments of localsMiddleware
2017-10-03 13:03:02 +02:00
Simon Martín
55f593eae6
adding forgotten semicolon
2017-10-02 12:08:10 +02:00
Simon Martín
c22a35489d
res.locals forgotten things and make jshint happy
2017-09-29 14:38:28 +02:00
Simon Martín
b4d03c074a
not move db params to res.locals.db
2017-09-29 11:07:11 +02:00
Simon
ca612dd02a
res.locals in context middlewares
2017-09-28 11:43:12 +02:00
Unknown
fedcb0d0f9
remove unused middleware
2017-09-28 11:23:53 +02:00
Simon
178b9e8563
moving layergroup-token middleware to middlewarify style
2017-09-27 16:32:49 +02:00
Simon
ac474cb253
Merge branch 'middlewarify' into layergroup-token-param
2017-09-27 16:31:08 +02:00
Simon
84cd93b1b0
make jshint happy
2017-09-26 18:25:47 +02:00
Simon
134cc9ac0c
changing req.locals to res.locals
2017-09-26 18:23:49 +02:00
Simon
b94dfe066d
removing some repeated things
2017-09-26 15:39:48 +02:00
Daniel García Aubert
f0920aedef
Remove unused module
2017-09-25 13:43:15 +02:00
Daniel García Aubert
b236112069
Split prepare context middleware and fix unit test
2017-09-25 13:40:22 +02:00
Daniel García Aubert
0e8fb68794
Extract token param to a middleware
2017-09-22 18:49:21 +02:00
Daniel García Aubert
f7b9287c93
Return an array of middlewares instead of big one in prepare context
2017-09-22 18:24:16 +02:00
Daniel García Aubert
85d4c81e58
Remove legacy hack
2017-09-22 18:15:48 +02:00
Daniel García Aubert
3bab081438
Rename req2params by prepareContext
2017-09-22 17:56:47 +02:00
Simon
c09899913f
finishing integration of lzma middleware
2017-09-22 16:46:39 +02:00
Simon
9d81321d78
Merge branch 'master' into middlewarify
2017-09-22 16:26:56 +02:00
Raul Ochoa
22b7828725
Layergroup Token parsing as middleware
...
Reuses LayergroupToken model from tests.
2017-09-22 12:05:40 +00:00
Daniel García Aubert
51ba3db4ac
Use req2params middleware for instantiate named map endpoint
2017-09-22 00:31:16 +02:00
Daniel García Aubert
02cd6a43ad
Move req2params method to a its own middleware
2017-09-21 13:27:22 +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
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
Raul Ochoa
ededc73fd7
Throw on invalid params argument
2017-03-31 18:39:29 +02:00
Raul Ochoa
94299f0452
Configure extra allowed params per endpoint via middleware
...
Instead of making all params available in all endpoints, we control
what endpoints allow what extra params.
Dataviews endpoints should be migrated to this.
2017-03-30 20:12:55 +02:00
Raul Ochoa
9cd67f06c1
User extraction from request middleware
...
Used only where potentially a user is required.
It doesn't make sense to extract a user for request that don't need
a user in the context.
2015-09-30 17:17:01 +02:00
Raul Ochoa
ef86bacf7f
Set headers with set method
2015-09-17 02:03:09 +02:00
Raul Ochoa
fa84813a37
Manage cors with a middleware
2015-07-08 13:27:56 +02:00