franciscogouveia / hapi-rbac

RBAC (Rule Based Access Control) for hapijs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Manage request headers in data retriever

peveuve opened this issue · comments

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();
}