From 487b46960333493059a24ca1ee10d83de38d555b Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 14 Jul 2025 00:15:46 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=A2=9E=E5=BC=BAcname=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/cname/service/cname-record-service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts index fd09c65f..bf252018 100644 --- a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts +++ b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts @@ -111,17 +111,17 @@ export class CnameRecordService extends BaseService { } param.hostRecord = hostRecord; - let cnameKey = utils.id.simpleNanoId(8).toLowerCase(); + const randomKey = utils.id.simpleNanoId(6).toLowerCase(); let userIdHash = "" if(param.cnameProviderId < 0){ //公共cname服务 - userIdHash = utils.hash.md5(`userId_${userId}`).substring(0, 8) + userIdHash = utils.hash.md5(`userId${userId}_${randomKey}`).substring(0, 10) }else{ const installInfo = await this.sysSettingsService.getSetting(SysInstallInfo) - userIdHash = utils.hash.md5(installInfo.siteId).substring(0, 8) + userIdHash = utils.hash.md5(`${installInfo.siteId}_${randomKey}`).substring(0, 10) } - cnameKey = `${userIdHash}-${cnameKey}`; + const cnameKey = `${userIdHash}-${randomKey}`; const safeDomain = param.domain.replaceAll('.', '-'); param.recordValue = `${safeDomain}.${cnameKey}.${cnameProvider.domain}`; }