mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-29 06:10:47 +00:00
preserves the rest of the path after the matched prefix
This commit is contained in:
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user