fix: add path prefix only if the path is other than "/"

This commit is contained in:
Jakub Bordáš
2024-11-05 11:39:30 +01:00
parent 1b1d0597fe
commit 476057663b

View File

@@ -268,7 +268,7 @@ export const createDomainLabels = async (
`traefik.http.routers.${routerName}.service=${routerName}`,
];
if (domain.path) {
if (domain.path && domain.path.length > 0 && domain.path !== "/") {
labels.push(
`traefik.http.routers.${routerName}.rule=PathPrefix(\`${domain.path}\`)`,
);