fix(core): update
This commit is contained in:
+21
@@ -53,6 +53,27 @@ export class SmartWhois {
|
||||
}
|
||||
}
|
||||
|
||||
public async getAdditionalWhoisDataForDomain(domainArg: string) {
|
||||
if (domainArg.includes('//')) {
|
||||
const parsedUrlResult = await this.getParsedUrlResultForWhois(domainArg);
|
||||
domainArg = parsedUrlResult.fullDomain;
|
||||
}
|
||||
|
||||
// lets test http response
|
||||
const httpResult = await plugins.smartrequest.safeGet(`http://${domainArg}/`);
|
||||
|
||||
// lets test https response
|
||||
const httpsResult = await plugins.smartrequest.safeGet(`https://${domainArg}/`);
|
||||
|
||||
return {
|
||||
httpStatus: httpResult.statusCode,
|
||||
httpsStatus: httpsResult.statusCode,
|
||||
httpContentType: httpResult.headers['content-type'],
|
||||
httpsContentType: httpsResult.headers['content-type'],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async getWhoisForDomain(domainArg: string): Promise<IWhoisInfo> {
|
||||
if (domainArg.includes('//')) {
|
||||
|
||||
Reference in New Issue
Block a user