mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-01 03:55:22 +02:00
fix(settings): simplify letsEncryptEmail assignment and ensure router rule is always updated with new host
This commit is contained in:
@@ -23,11 +23,18 @@ export const updateServerTraefik = (
|
||||
config.http.routers = config.http.routers || {};
|
||||
config.http.services = config.http.services || {};
|
||||
|
||||
// Get or create router config, but always update the rule with newHost
|
||||
const currentRouterConfig = config.http.routers[`${appName}-router-app`] || {
|
||||
rule: `Host(\`${newHost}\`)`,
|
||||
service: `${appName}-service-app`,
|
||||
entryPoints: ["web"],
|
||||
rule: `Host(\`${newHost}\`)`,
|
||||
};
|
||||
|
||||
// Always update the rule with the new host
|
||||
if (newHost) {
|
||||
currentRouterConfig.rule = `Host(\`${newHost}\`)`;
|
||||
}
|
||||
|
||||
config.http.routers[`${appName}-router-app`] = currentRouterConfig;
|
||||
|
||||
config.http.services = {
|
||||
|
||||
Reference in New Issue
Block a user