diff --git a/ts/config/classes.target-profile-manager.ts b/ts/config/classes.target-profile-manager.ts index 8a56e7c..be12b76 100644 --- a/ts/config/classes.target-profile-manager.ts +++ b/ts/config/classes.target-profile-manager.ts @@ -280,12 +280,13 @@ export class TargetProfileManager { if (route.name && profile.routeRefs.includes(route.name)) return true; } - // 2. Domain match + // 2. Domain match (bidirectional: profile-specific + route-wildcard, or vice versa) if (profile.domains?.length) { const routeDomains: string[] = (route.match as any)?.domains || []; for (const profileDomain of profile.domains) { for (const routeDomain of routeDomains) { - if (this.domainMatchesPattern(routeDomain, profileDomain)) return true; + if (this.domainMatchesPattern(routeDomain, profileDomain) || + this.domainMatchesPattern(profileDomain, routeDomain)) return true; } } }