feat(routes): add remote ingress controls and preserve-port targeting for route configuration

This commit is contained in:
2026-04-17 06:17:49 +00:00
parent 152110c877
commit 2891e5d3ee
6 changed files with 140 additions and 11 deletions

View File

@@ -192,7 +192,16 @@ export class RouteConfigManager {
}
}
}
stored.route = { ...stored.route, ...patch.route, action: mergedAction } as IDcRouterRouteConfig;
const mergedRoute = { ...stored.route, ...patch.route, action: mergedAction } as IDcRouterRouteConfig;
// Handle explicit null to remove optional top-level route properties (e.g., remoteIngress: null)
for (const [key, val] of Object.entries(patch.route)) {
if (val === null && key !== 'action' && key !== 'match') {
delete (mergedRoute as any)[key];
}
}
stored.route = mergedRoute;
}
if (patch.enabled !== undefined) {
stored.enabled = patch.enabled;