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 ?
Martin
February 1, 2017, 9:21pm
2
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.
Martin
February 3, 2017, 7:01am
4
Afraid not - these settings are per-path :-/
rob
February 6, 2017, 8:18am
5
+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
Martin
February 9, 2017, 5:06am
7
Starting small, we’ve put this in our backloog:
opened 05:05AM - 09 Feb 17 UTC
closed 11:25AM - 24 May 18 UTC
enhancement
needs documenting
**Do you want to request a *feature* or report a *bug*?**
feature
**What is … the current behavior?**
If I version an API and store the data in the url (e.g. `listen_path/v1/this/resource`, then only the `listen_path` portion is stripped.
**What is the expected behavior?**
I should be able to strip the version information from the path as well so that `listen_path/v1` is stripped as a block.
**Which versions of Tyk affected by this issue? Did this work in previous versions of Tyk?**
All
Feel free to suggest features in our GH tracker
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.
1 Like