fix: cert condition

This commit is contained in:
Lorenzo Migliorero
2024-07-31 09:58:57 +02:00
parent 5491653fe9
commit 5aaa1e55f9
2 changed files with 22 additions and 4 deletions

View File

@@ -26,13 +26,13 @@ export const updateServerTraefik = (
config.http.routers[`${appName}-router-app-secure`] = {
...currentRouterConfig,
entryPoints: ["web-secure"],
tls:
admin?.certificateType === "letsencrypt"
? { certResolver: "letsencrypt" }
: undefined,
tls: { certResolver: "letsencrypt" },
};
currentRouterConfig.middlewares = ["redirect-to-https"];
} else {
delete config.http.routers[`${appName}-router-app-secure`];
currentRouterConfig.middlewares = [];
}
}