URL Versioning(first element) appended to upstream target

Hello there,

I am facing a problem.
I want to handle versioning in as the first url element, but the version is then append to the upstream target url and that cause some major problem as you can imagine.

Say i want to get a resource “customers”

What i would like
ex: tyk-host-api/v1/customers => upstream-target-url/customers

What i get:
ex: tyk-host-api/v1/customers => upstream-target-url/v1/customers

How am i suppose to handle this scenario ?

You may want to add a URL rewrite, the version data is not stripped from the path.

Is it possible to do it globally for an api ?

Cause if i have to do it per resource(path) that would be annoying.

Thanks in advance.

Afraid not - these settings are per-path :-/

+1 for a boolean option to strip the versioning information from the path

1 Like

+1 for an option to execute an inline “REPLACE” in the called URL.

This can fit nicely close to the GLOBAL VERSION SETTINGS here:

The version URL might also benefit from some flexibility:

Maybe some kind of ACL approach? HAProxy has some good practises.

1 Like

Starting small, we’ve put this in our backloog:

Feel free to suggest features in our GH tracker :slight_smile:

1 Like

Cool!, Thanks!

Adding some more text because I can’t seem to post this short messages; probably this is set for a good reason but hey, I’m ingorant. :kissing_heart:

1 Like