fix(routes): support profile and target metadata in route creation and refresh remote ingress routes after config initialization

This commit is contained in:
2026-04-02 17:27:05 +00:00
parent 0577f45ced
commit 55f5465a9a
9 changed files with 121 additions and 45 deletions

View File

@@ -2060,6 +2060,13 @@ export class DcRouter {
const currentRoutes = this.constructorRoutes;
this.remoteIngressManager.setRoutes(currentRoutes as any[]);
// Race-condition fix: if ConfigManagers finished before us, re-apply routes
// so the callback delivers the full merged set (including DB-stored routes)
// to our newly-created remoteIngressManager.
if (this.routeConfigManager) {
await this.routeConfigManager.applyRoutes();
}
// Resolve TLS certs for tunnel: explicit paths > ACME for hubDomain > self-signed (Rust default)
const riCfg = this.options.remoteIngressConfig;
let tlsConfig: { certPem: string; keyPem: string } | undefined;