You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying out the Dingo API to build a Web App. The way Dingo handles api versions is to define an Accept header with a specific version. There is nothing in the URL to indicate the version. To use curl to get a version would look something like:
Lets assume that Servers A and B and running the service however Server A has version 1, 2 and 3 but Server B has only version 1. how could I use Fabio to route this app based on its Accept Header (or any custom header I would assume). Maybe this has nothing to do with Fabio and should be handled in the Consul service def. Without changing the URL I'm not sure how I could set this up in consul to handle multiple versions.
The text was updated successfully, but these errors were encountered:
Right now you can't since fabio does not route by header. Adding this to the proxy code isn't the main issue. At present I don't have a way to let you configure this. See #111
The way we're doing this - since we are taking exactly this versioning approach - is to have all services handle all versions. The content type versions should be deprecated over time anyway so ideally you might have only 1-2 versions of a given entity to support.
Do you have this problem right now which prevents you from using fabio or are you considering this a potential roadblock for adoption?
Thank you for the fast response! I would not consider this issue a roadblock. For simplicity sake I'm likely going to force all api servers to handle all versions anyway. This only becomes an issue if a second version of the API actually existed. Again thank you for the fast response.
I'm trying out the Dingo API to build a Web App. The way Dingo handles api versions is to define an Accept header with a specific version. There is nothing in the URL to indicate the version. To use curl to get a version would look something like:
curl -v -H "Accept: application/vnd.YOUR_SUBTYPE.v1+json" http://example.app/users
Lets assume that Servers A and B and running the service however Server A has version 1, 2 and 3 but Server B has only version 1. how could I use Fabio to route this app based on its Accept Header (or any custom header I would assume). Maybe this has nothing to do with Fabio and should be handled in the Consul service def. Without changing the URL I'm not sure how I could set this up in consul to handle multiple versions.
The text was updated successfully, but these errors were encountered: