node-restify-validation
node-restify-validation copied to clipboard
Non lowercase header validation
When using this configuration:
validation: { headers: { 'x-app-key': { isRequired: true } } }
A request using the required field works fine:
curl -X POST -H "Content-Type: application/json" -H "x-app-key: 123123"
However, when trying to use uppercase letters in the header name:
validation: { headers: { 'X-app-key': { isRequired: true } } }
A similar request:
curl -X POST -H "Content-Type: application/json" -H "X-app-key: 123123"
Throws:
{"code":"InvalidArgument","message":"X-app-key (MISSING): Field is required"}