diff --git a/src/main/java/dev/dinauer/oidcproxy/proxy/ProxyResource.java b/src/main/java/dev/dinauer/oidcproxy/proxy/ProxyResource.java index de1374a..e5f29d9 100644 --- a/src/main/java/dev/dinauer/oidcproxy/proxy/ProxyResource.java +++ b/src/main/java/dev/dinauer/oidcproxy/proxy/ProxyResource.java @@ -59,7 +59,7 @@ public class ProxyResource public void proxy(@Context RoutingContext context) { HttpServerRequest request = context.request(); - + System.out.println(request.path()); List requestSegments = PathConverter.toSegments(request.path()); Optional 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 response = forwardService.send(context, targetURI, route.strategy()); ResponseHandler.success(context, response); } diff --git a/src/main/resources/routes.yaml b/src/main/resources/routes.yaml index 34e2cc7..11de261 100644 --- a/src/main/resources/routes.yaml +++ b/src/main/resources/routes.yaml @@ -2,6 +2,6 @@ routes: - path: /api target: http://localhost:8081 strategy: OIDC - - path: /example + - path: / target: http://example.com - strategy: OIDC \ No newline at end of file + strategy: NONE \ No newline at end of file