-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: any option to define wildcard in endpoints? #30
Comments
Hi, @Kalise if you know the pattern of your URL structure/strategy, you can use regular URL params. Following your example, you could use this config:
and the querystring params will be passed too EDIT: this proposed solution is also not supported by the gin router. gin-gonic/gin#1681 |
Thanks @kpacha, Any option to have Krakend supporting wildcards |
We avoided supporting wildcards because the way we understand the API Gateway pattern and its differences with a pure L7 router. As discussed on the post what is an api gateway:
and
If you are looking just for routing the requests and responses on an url-pattern basis, without any further manipulation, maybe you need a pure kubernetes proxy. cheers! |
@kpacha Thanks for your answer. |
Sorry for asking, but has this been reconsidered? That blog post says that we shouldn't put cross-cutting concerns on an Api Gateway (like token validation) IF we're not adapting and decoupling the contract of the microservices, if I understand correctly. Adapting contracts and cross-cutting concerns are two different things, but KrakenD decided to support both. Why not just offer the full toolbox to developers only interested in cross-cutting concerns for a given endpoint? |
hi @aserrallerios , in order to keep the issues as clean as possible, I'd suggest you to join the krakend channel at the gopher's slack. Here, the invite link: https://invite.slack.golangbridge.org/ |
This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link. |
Hello, first of all it's an amazing project!
Any option to setup a wildcard in endpoints preserving the structure? For example, I want forward
http://krakend:8000/myserviceA/humans/man/user?userId={id} http://krakend:8000/myserviceA/animals/dogs/dog?dogId={id} http://krakend:8000/myserviceA/animals/cats/cat?catId={id}
to the backend
http://serverA/
preserving the structure of the paths above, i.ehttp://serverA/humans/man/user?userId={id} http://serverA/myserviceA/animals/dogs/dog?dogId={id} http://serverA/myserviceA/animals/cats/cat?catId={id}
On the other hands, I want to forward
http://krakend:8000/myserviceB/humans/man/user?userId={id} http://krakend:8000/myserviceB/animals/dogs/dog?dogId={id} http://krakend:8000/myserviceB/animals/cats/cat?catId={id}
to the backend
http://serverB/
preserving the same structure.Something like this:
O something similar. Any idea?
Thanks
The text was updated successfully, but these errors were encountered: