From 7a19f9f2dc8b4e29b6ca4df6fda237c11b1d65fb Mon Sep 17 00:00:00 2001 From: Andreas Dinauer Date: Mon, 6 Apr 2026 20:15:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Dont=20drop=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/dev/dinauer/oidcproxy/proxy/ProxyResource.java | 5 ++--- src/main/resources/routes.yaml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) 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