You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Path template configuration with regular expressions #753
I went through the documentation page on routing and didn't notice any mention for using regular expressions in path template properties.
After haphazardly experimenting with different expressions for UpstreamPathTemplate, I noticed a simple expression like (.+) appeared to be able to match against input, but I couldn't figure out whether the captured group could be used in DownstreamPathTemplate. Or perhaps this was purely coincidental behaviour.
I just wanted to ask whether or not there was support for using regular expressions to capture fragments of a route. If there's any documentation I missed regarding this, please point me in the right direction.
Would this allow routing restrictions, so that if certain values appear in the upstream route they will go to destination 1, if others appear go to destination 2?
Defining 2 ReRoutes is fine, but I want to have something like:
myurl/customer/(Bob|Andy)/accounts go to destination 1,
myurl/customer/(Other|Any|None)/accounts go to destination 2
I went through the documentation page on routing and didn't notice any mention for using regular expressions in path template properties.
Regular expressions in templates are not supported/implemented!
After haphazardly experimenting with different expressions for UpstreamPathTemplate, I noticed a simple expression like (.+) appeared to be able to match against input, but I couldn't figure out whether the captured group could be used in DownstreamPathTemplate. Or perhaps this was purely coincidental behavior.
coincidental behavior
I just wanted to ask whether or not there was support for using regular expressions to capture fragments of a route. If there's any documentation I missed regarding this, please point me in the right direction.
No documentation at all! Not implemented!
If you need this feature → Please contribute!
Activity
philproctor commentedon Jan 16, 2019
This will be resolved as part of my work on #737
Currently regex will work in the path, but the capture groups cannot be sent to the downstream. After this work, this will be possible.
miqh commentedon Jan 16, 2019
@philproctor, that's great to hear! Thanks for the update. 🙌
GadgetGeekUK commentedon Oct 18, 2019
Would this allow routing restrictions, so that if certain values appear in the upstream route they will go to destination 1, if others appear go to destination 2?
Defining 2 ReRoutes is fine, but I want to have something like:
myurl/customer/(Bob|Andy)/accounts go to destination 1,
myurl/customer/(Other|Any|None)/accounts go to destination 2
Thanks.
szymonpiekny commentedon Feb 22, 2022
Something new?
raman-m commentedon Jan 7, 2024
@philproctor commented on Jan 16, 2019:
Aha! The #737 issue is closed by me. Reason: No communication.
raman-m commentedon Jan 7, 2024
@miqh commented on Jan 16, 2019:
Regular expressions in templates are not supported/implemented!
coincidental behavior
No documentation at all! Not implemented!
If you need this feature → Please contribute!