fix(domains): improve shared Nginx reconciliation logic in domain routes
This commit is contained in:
1 parent
f38f8f16d3
commit
e097467c95
2 files changed
+14
-2
No files matched your search
@@ -1837,8 +1837,13 @@ export async function domainRoutes(app: FastifyInstance) {
|
||||
const willBeSharedNginx = isSharedNginxConfig(nextInput);
|
||||
const previousRootDomain = getDomainConfigAnchor([existing.name]);
|
||||
const nextRootDomain = getDomainConfigAnchor([nextInput.name]);
|
||||
const previousSharedGroupNames =
|
||||
const shouldReconcilePreviousShared =
|
||||
wasSharedNginx &&
|
||||
(!willBeSharedNginx ||
|
||||
existing.serverId !== (nextInput.serverId ?? null) ||
|
||||
previousRootDomain !== nextRootDomain);
|
||||
const previousSharedGroupNames =
|
||||
shouldReconcilePreviousShared &&
|
||||
existing.serverId &&
|
||||
existing.targetContainerId &&
|
||||
existing.targetPort
|
||||
@@ -1938,7 +1943,7 @@ export async function domainRoutes(app: FastifyInstance) {
|
||||
});
|
||||
|
||||
if (
|
||||
wasSharedNginx &&
|
||||
shouldReconcilePreviousShared &&
|
||||
existing.serverId &&
|
||||
existing.targetContainerId &&
|
||||
existing.targetPort
|
||||
|
||||
Reference in new issue
Block a user