Aconex / drakov

Mock Server that implements the API Blueprint specification
MIT License
481 stars 115 forks source link

ignoreHeader error, TypeError: ignoreHeaders.map is not a function #192

Closed slax0rr closed 4 years ago

slax0rr commented 4 years ago

Hello,

I wanted to set the Authorization header to ignore using the --ignoreHeader option, but it produces the bellow error when vising an endpoint:

TypeError: ignoreHeaders.map is not a function
    at Object.exports.matchesHeader (/usr/lib/node_modules/drakov/lib/content.js:114:53)
    at /usr/lib/node_modules/drakov/lib/handler-filter.js:6:24
    at Array.filter (<anonymous>)
    at Object.exports.filterHandlers (/usr/lib/node_modules/drakov/lib/handler-filter.js:36:37)
    at /usr/lib/node_modules/drakov/lib/middleware/route-handlers.js:26:38
    at Array.forEach (<anonymous>)
    at middleware (/usr/lib/node_modules/drakov/lib/middleware/route-handlers.js:15:35)
    at Layer.handle [as handle_request] (/usr/lib/node_modules/drakov/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/lib/node_modules/drakov/node_modules/express/lib/router/index.js:317:13)
    at /usr/lib/node_modules/drakov/node_modules/express/lib/router/index.js:284:7

Full command: drakov -f public.apib -p 8080 --ignoreHeader Authorization

Version: 1.0.4

ongspxm commented 4 years ago

same issue, any possible area to look into?