diff --git a/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/dns.component.ts b/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/dns.component.ts index 4deebe78a..19e70beab 100644 --- a/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/dns.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/dns.component.ts @@ -123,7 +123,7 @@ export class DnsComponent { ] } - const segments = subdomain.split('.') + const segments = subdomain.split('.').slice(1) const subdomains = this.i18n.transform('subdomains of') @@ -133,7 +133,7 @@ export class DnsComponent { purpose: `only ${subdomain}`, }, ...segments.map((_, i) => { - const parent = segments.slice(i + 1).join('.') + const parent = segments.slice(i).join('.') return { host: `*.${parent}`, purpose: `${subdomains} ${parent}`, diff --git a/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/pd.service.ts b/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/pd.service.ts index 4e6a6ac79..928a43691 100644 --- a/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/pd.service.ts +++ b/web/projects/ui/src/app/routes/portal/components/interfaces/public-domains/pd.service.ts @@ -157,7 +157,7 @@ export class PublicDomainService { gatewayId: string, authority: 'local' | string, ) { - const gateway = this.data()!.gateways.find(g => (g.id = gatewayId))! + const gateway = this.data()!.gateways.find(g => g.id === gatewayId)! const loader = this.loader.open('Saving').subscribe() const params = { @@ -178,6 +178,7 @@ export class PublicDomainService { } const wanIp = gateway.ipInfo.wanIp + let message = this.i18n.transform( 'Create one of the DNS records below.', ) as i18nKey