🚧 Dont drop prefix

This commit is contained in:
Andreas Dinauer 2026-04-06 20:15:08 +02:00
parent 30dc6811c9
commit 7a19f9f2dc
2 changed files with 4 additions and 5 deletions

View File

@ -59,7 +59,7 @@ public class ProxyResource
public void proxy(@Context RoutingContext context) public void proxy(@Context RoutingContext context)
{ {
HttpServerRequest request = context.request(); HttpServerRequest request = context.request();
System.out.println(request.path());
List<String> requestSegments = PathConverter.toSegments(request.path()); List<String> requestSegments = PathConverter.toSegments(request.path());
Optional<ProxyRoute> routeOptional = routeService.match(requestSegments); Optional<ProxyRoute> routeOptional = routeService.match(requestSegments);
@ -69,8 +69,7 @@ public class ProxyResource
LOG.info("Matched route with target '{}'", route.target()); LOG.info("Matched route with target '{}'", route.target());
try try
{ {
String targetPath = PathConverter.toPath(dropPrefix(route.segments(), requestSegments)); String targetURI = route.target() + PathConverter.toPath(requestSegments);
String targetURI = route.target() + targetPath;
HttpResponse<byte[]> response = forwardService.send(context, targetURI, route.strategy()); HttpResponse<byte[]> response = forwardService.send(context, targetURI, route.strategy());
ResponseHandler.success(context, response); ResponseHandler.success(context, response);
} }

View File

@ -2,6 +2,6 @@ routes:
- path: /api - path: /api
target: http://localhost:8081 target: http://localhost:8081
strategy: OIDC strategy: OIDC
- path: /example - path: /
target: http://example.com target: http://example.com
strategy: OIDC strategy: NONE