Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI option --ignoreHeader causes error #177

Closed
b1f6c1c4 opened this issue Dec 30, 2017 · 1 comment
Closed

CLI option --ignoreHeader causes error #177

b1f6c1c4 opened this issue Dec 30, 2017 · 1 comment

Comments

@b1f6c1c4
Copy link

[System.Environment]::OSVersion.Version
# Major  Minor  Build  Revision
# -----  -----  -----  --------
# 10     0      16299  0

node --version
# v9.3.0
npm --version
# 5.5.1
npm --global install drakov@1.0.4
drakov -f ../master/docs/api.apib -p 3001 --autoOptions --ignoreHeader Authorization

Then curl it will get:

TypeError: ignoreHeaders.map is not a function
at Object.exports.matchesHeader (C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\lib\content.js:115:53)
at C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\lib\handler-filter.js:6:24
at Array.filter ()
at Object.exports.filterHandlers (C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\lib\handler-filter.js:36:37)
at C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\lib\middleware\route-handlers.js:26:38
at Array.forEach ()
at middleware (C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\lib\middleware\route-handlers.js:15:35)
at Layer.handle [as handle_request] (C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\node_modules\express\lib\router\index.js:317:13)
at C:\Users\b1f6c1c4\AppData\Roaming\npm\node_modules\drakov\node_modules\express\lib\router\index.js:284:7

But drakov -f ../master/docs/api.apib -p 3001 --autoOptions --ignoreHeader Authorization --ignoreHeader Cookie will be fine.

@aj-jaswanth
Copy link
Contributor

Hi @b1f6c1c4 This is fixed as part of #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants