File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ export class CustomDomain {
4949 if ( ! this . isAutoDomain ( ) ) {
5050 return ;
5151 }
52- const autoDomainName = this . getAutoDomainName ( ) ;
53- let functionName = this . getProps ( ) [ 'routeConfig' ] [ 'routes' ] [ 0 ] [ 'functionName' ] ;
52+ const { autoDomainName, functionName } = this . getAutoDomainName ( ) ;
5453 const userId = this . credentials . AccountID ;
5554 const isResolve = await resolveCname (
5655 autoDomainName ,
@@ -78,12 +77,14 @@ export class CustomDomain {
7877 }
7978
8079 private getAutoDomainName ( ) {
80+ const logger = GLogger . getLogger ( ) ;
8181 // 取第一个 path 中的 functionName
8282 let functionName = this . getProps ( ) [ 'routeConfig' ] [ 'routes' ] [ 0 ] [ 'functionName' ] ;
8383 const userId = this . credentials . AccountID ;
8484 functionName = functionName . replace ( / _ / g, '-' ) . toLowerCase ( ) ;
8585 let autoDomainName = `${ functionName } .fcv3.${ userId } .${ this . region } .fc.devsapp.net` ;
86- return autoDomainName ;
86+ logger . debug ( `getAutoDomainName = ${ autoDomainName } ` ) ;
87+ return { autoDomainName, functionName } ;
8788 }
8889
8990 public async cnameCheck ( ) : Promise < boolean > {
You can’t perform that action at this time.
0 commit comments