Use getPath instead of getRawPath to prevent doulbe encoding of the URI
Signed-off-by: Jens Mallien <108389225+jensmatw@users.noreply.github.com>
This commit is contained in:
committed by
Jens Mallien
parent
656ab5aba4
commit
e27e320023
@@ -324,7 +324,7 @@ public abstract class BeforeFilterFunctions {
|
||||
Pattern pattern = Pattern.compile(regexp);
|
||||
return request -> {
|
||||
// TODO: original request url
|
||||
String path = request.uri().getRawPath();
|
||||
String path = request.uri().getPath();
|
||||
String newPath = pattern.matcher(path).replaceAll(normalizedReplacement);
|
||||
|
||||
URI rewrittenUri = UriComponentsBuilder.fromUri(request.uri()).replacePath(newPath).build().toUri();
|
||||
|
||||
Reference in New Issue
Block a user