mirror of
https://github.com/certd/certd.git
synced 2026-05-17 13:57:31 +08:00
feat: 域名验证方法支持CNAME间接方式,此方式支持所有域名注册商,且无需提供Access授权,但是需要手动添加cname解析
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { CnameRecord, ICnameProxyService } from '@certd/pipeline';
|
||||
|
||||
export class CnameProxyService implements ICnameProxyService {
|
||||
userId: number;
|
||||
getter: <T>(domain: string, userId?: number) => Promise<T>;
|
||||
constructor(userId: number, getter: (domain: string, userId: number) => Promise<any>) {
|
||||
this.userId = userId;
|
||||
this.getter = getter;
|
||||
}
|
||||
|
||||
getByDomain(domain: string): Promise<CnameRecord> {
|
||||
return this.getter<CnameRecord>(domain, this.userId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user