🚧 Dont drop prefix
This commit is contained in:
parent
30dc6811c9
commit
7a19f9f2dc
@ -59,7 +59,7 @@ public class ProxyResource
|
||||
public void proxy(@Context RoutingContext context)
|
||||
{
|
||||
HttpServerRequest request = context.request();
|
||||
|
||||
System.out.println(request.path());
|
||||
List<String> requestSegments = PathConverter.toSegments(request.path());
|
||||
|
||||
Optional<ProxyRoute> routeOptional = routeService.match(requestSegments);
|
||||
@ -69,8 +69,7 @@ public class ProxyResource
|
||||
LOG.info("Matched route with target '{}'", route.target());
|
||||
try
|
||||
{
|
||||
String targetPath = PathConverter.toPath(dropPrefix(route.segments(), requestSegments));
|
||||
String targetURI = route.target() + targetPath;
|
||||
String targetURI = route.target() + PathConverter.toPath(requestSegments);
|
||||
HttpResponse<byte[]> response = forwardService.send(context, targetURI, route.strategy());
|
||||
ResponseHandler.success(context, response);
|
||||
}
|
||||
|
||||
@ -2,6 +2,6 @@ routes:
|
||||
- path: /api
|
||||
target: http://localhost:8081
|
||||
strategy: OIDC
|
||||
- path: /example
|
||||
- path: /
|
||||
target: http://example.com
|
||||
strategy: OIDC
|
||||
strategy: NONE
|
||||
Loading…
x
Reference in New Issue
Block a user