Fix FOU-106

This commit is contained in:
Owen
2025-09-28 18:07:53 -07:00
parent be2b2c6c77
commit bf993d04f1
2 changed files with 11 additions and 6 deletions

View File

@@ -352,12 +352,17 @@ export async function getTraefikConfig(
if (resource.path && resource.pathMatchType) {
priority += 1;
// add path to rule based on match type
let path = resource.path;
// if the path doesn't start with a /, add it
if (!path.startsWith("/")) {
path = `/${path}`;
}
if (resource.pathMatchType === "exact") {
rule += ` && Path(\`${resource.path}\`)`;
rule += ` && Path(\`${path}\`)`;
} else if (resource.pathMatchType === "prefix") {
rule += ` && PathPrefix(\`${resource.path}\`)`;
rule += ` && PathPrefix(\`${path}\`)`;
} else if (resource.pathMatchType === "regex") {
rule += ` && PathRegexp(\`${resource.path}\`)`;
rule += ` && PathRegexp(\`${resource.path}\`)`; // this is the raw path because it's a regex
}
}