From 3722b6772433a9ff597f1fe2df3c060eb6d23efb Mon Sep 17 00:00:00 2001 From: Pallavi Kumari Date: Sun, 28 Sep 2025 13:05:58 +0530 Subject: [PATCH] preserves the rest of the path after the matched prefix --- server/routers/traefik/getTraefikConfig.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/routers/traefik/getTraefikConfig.ts b/server/routers/traefik/getTraefikConfig.ts index 49bb50fd..789b2f82 100644 --- a/server/routers/traefik/getTraefikConfig.ts +++ b/server/routers/traefik/getTraefikConfig.ts @@ -184,9 +184,10 @@ function createPathRewriteMiddleware( switch (rewritePathType) { case "exact": // Replace the entire path with the exact rewrite path + let exactPattern = `^${escapeRegex(path)}$`; middlewares[middlewareName] = { replacePathRegex: { - regex: "^.*$", + regex: exactPattern, replacement: rewritePath } };