p-meier / hapi-api-version

An API versioning plugin for hapi.
Apache License 2.0
74 stars 26 forks source link

Add ability to prevent usage of the custom versionHeader #8

Closed adam-26 closed 8 years ago

adam-26 commented 8 years ago

Hi, I like your plugin, but I would like to be able to disable the use of the custom versionHeader, requiring client use the accept header only. Would you accept a pull-request that allows the options.versionHeader to be null, in which case the plugin does not check for a version in the custom header?

Thanks, Adam.

p-meier commented 8 years ago

Hi, thanks for your feedback. Always happy to hear people actually have value using my plugin :-)

Now to your request. Why do you want to disable checking the custom header? I consider it a plugin feature that it checks both headers (accept and custom). Does it really hurt you if the client can use both ways? Maybe just document one way and the possible client is unaware of the other one and therefore uses only the desired accept header solution.

So to your question. No I would not accept a pull request disabling this feature. I consider it a useful feature.