franciscogouveia / hapi-rbac

RBAC (Rule Based Access Control) for hapijs
ISC License
105 stars 20 forks source link

Manage request headers in data retriever #37

Open peveuve opened 7 years ago

peveuve commented 7 years ago

I would like to be able to check some HTTP headers in the request, like the Accept-language, to determine the access right on certain routes. Is it OK for you if I submit a PR to manage that in the request data retriever ?

// Check allowed keys if (['method', 'path', 'headers'].indexOf(key) === -1) { return callback(); }