Skip to content

Routing based on Accept Header #155

@wstaples

Description

@wstaples

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions