node-restify-validation icon indicating copy to clipboard operation
node-restify-validation copied to clipboard

Non lowercase header validation

Open juvaly opened this issue 7 years ago • 0 comments

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"}

juvaly avatar Feb 16 '18 18:02 juvaly