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.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
module.exports = function allowQueryParams(params) {
|
||||
return function allowQueryParamsMiddleware(req, res, next) {
|
||||
req.context.allowedQueryParams = params;
|
||||
next();
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user