Merge pull request #649 from ignissak/648-compose-services-ignore-domain-path-setting

fix: domain path ignored in compose services
This commit is contained in:
Mauricio Siu 2024-11-06 10:45:23 -06:00 committed by GitHub
commit 1e1409e651
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -268,6 +268,12 @@ export const createDomainLabels = async (
`traefik.http.routers.${routerName}.service=${routerName}`,
];
if (domain.path && domain.path.length > 0 && domain.path !== "/") {
labels.push(
`traefik.http.routers.${routerName}.rule=PathPrefix(\`${domain.path}\`)`,
);
}
if (entrypoint === "web" && https) {
labels.push(
`traefik.http.routers.${routerName}.middlewares=redirect-to-https@file`,