feat: remove path prefix if different than /

This commit is contained in:
Lorenzo Migliorero
2024-07-29 16:31:49 +02:00
parent 947d2217df
commit 797931dfe9
2 changed files with 12 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ export const createRouterConfig = async (
const { host, path, https, uniqueConfigKey } = domain;
const routerConfig: HttpRouter = {
rule: `Host(\`${host}\`)${path ? ` && PathPrefix(\`${path}\`)` : ""}`,
rule: `Host(\`${host}\`)${path !== null && path !== "/" ? ` && PathPrefix(\`${path}\`)` : ""}`,
service: `${appName}-service-${uniqueConfigKey}`,
middlewares: [],
entryPoints: [entryPoint],