We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents afae589 + a2ae71b commit 10fc88aCopy full SHA for 10fc88a
1 file changed
server/lib/traefik/TraefikConfigManager.ts
@@ -527,6 +527,24 @@ export class TraefikConfigManager {
527
if (match && match[1]) {
528
domains.add(match[1]);
529
}
530
+ // Match HostRegexp(`^[^.]+\.parent.domain$`) generated for wildcard resources
531
+ const hostRegexpMatch = router.rule.match(
532
+ /HostRegexp\(`([^`]+)`\)/
533
+ );
534
+ if (hostRegexpMatch && hostRegexpMatch[1]) {
535
+ const innerRegex = hostRegexpMatch[1];
536
+ // Pattern is always ^[^.]+\.PARENT_DOMAIN$ where dots are escaped as \.
537
+ const domainMatch = innerRegex.match(
538
+ /^\^\[\^\.\]\+\\\.(.+)\$$/
539
540
+ if (domainMatch && domainMatch[1]) {
541
+ const parentDomain = domainMatch[1].replace(
542
+ /\\\./g,
543
+ "."
544
545
+ domains.add(`*.${parentDomain}`);
546
+ }
547
548
549
550
0 commit comments