elliotttf / express-request-version

Express middleware for defining and validating a version.
1 stars 2 forks source link

Version from custom HTTP header #61

Open lirantal opened 7 years ago

lirantal commented 7 years ago

Great stuff on this library @elliotttf.

I skimmed quickly through the tests but wanted to be sure if it would be possible to just specify the requested version using a custom HTTP header, e.g: X-API-Version: v1.0.0 ?

elliotttf commented 7 years ago

@lirantal sorry for the late response, the current implementation expects to use the accept header to negotiate the version to use. It would be pretty easy to add support for any header though, PRs are absolutely welcome.