Skip to content
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

[ASK] Service Path Regex #4267

Closed
rockmantist opened this issue Jan 31, 2019 · 5 comments
Closed

[ASK] Service Path Regex #4267

rockmantist opened this issue Jan 31, 2019 · 5 comments

Comments

@rockmantist
Copy link

Hi just wanna ask simple question about regex.
I have a route like this /v1/channels/clients/\d+
How can i match that regex in service ?
I've tried to add that regex in service's path but got error "character outside of the reserved list of RFC 3986..."
My service path /v1/rdo/clients, i want to forward that regex value to service

Thank you

Additional Details & Logs

  • Kong version ($ kong version) => 0.14
  • Operating system => Ubuntu 18.04
@vijayanjay
Copy link

vijayanjay commented Mar 18, 2019

Even I am facing the same issue, while trying to configure a service like below, I couldn't do.
/call/v1/session/{id}/particles

So how to configure regex in service path.

@brianhhq
Copy link

facing similar issues.

@Tieske
Copy link
Member

Tieske commented Jul 25, 2019

The service path, is the path to the upstream. You can configure regex on the route path, which is used to match incoming requests.

Question is though; do you need to match the full path. Or only a prefix? In the latter case you don't need a regex at all.

Please check out the proxy reference guide from the docs. (On mobile, so no links)

@kikito
Copy link
Member

kikito commented Jul 26, 2019

For completeness, here's the link @Tieske was referring to:

https://docs.konghq.com/1.2.x/proxy/#using-regexes-in-paths

@kikito kikito closed this as completed Jul 26, 2019
@evishalarora
Copy link

Being an enterprise customer, I use route-transformer-advanced plugin, which allows me to change the path using the capture groups from route url.

mayocream added a commit that referenced this issue Jan 4, 2023
(cherry picked from commit c05719cf59c0a54869c67deb0a1ef5408b8774a9)

Co-authored-by: Mayo <i@shoujo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants