-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add the ability to change request uri dynamically in filters #286
Conversation
Codecov Report
@@ Coverage Diff @@
## master #286 +/- ##
==========================================
+ Coverage 75.88% 76.33% +0.44%
==========================================
Files 105 107 +2
Lines 2613 2645 +32
Branches 191 191
==========================================
+ Hits 1983 2019 +36
+ Misses 524 520 -4
Partials 106 106
Continue to review full report at Codecov.
|
Awesome! The one thing I might consider would be pulling |
Hi, dear dev team:
if we need to change original uri to "lb://XXX", MalformedURLException will be catched and return null. I think this an common scenario.
|
Create a URI object directly, not a url first. |
So, may I push a PR to fix it? I think some testcase needed to be modified to allowd "lb://XXX" |
PRs welcome |
@spencergibb |
This PR adds
AbstractChangeRequestUriGatewayFilterFactory
that enables the gateway to change URL dynamically usingServerWebExchange
.As a implementation,
RequestHeaderToRequestUriGatewayFilterFactory
comes with this PR that determine URL by a request header.This factory will be pretty useful when implementing Cloud Foundry Route Service.
also fixes #276
https://twitter.com/Fitzoh/status/985423505947754496