diff --git a/src/tools/read.ts b/src/tools/read.ts index 1986c7c..a65d177 100644 --- a/src/tools/read.ts +++ b/src/tools/read.ts @@ -21,6 +21,7 @@ export function readUrl(url: string, withAllLinks?: boolean, tracker?: TokenTrac 'Content-Type': 'application/json', 'X-Retain-Images': 'none', 'X-Md-Link-Style': 'discarded', + 'X-Engine': 'direct' }; if (withAllLinks) { headers['X-With-Links-Summary'] = 'all' diff --git a/src/utils/url-tools.ts b/src/utils/url-tools.ts index b6078db..53ba628 100644 --- a/src/utils/url-tools.ts +++ b/src/utils/url-tools.ts @@ -466,7 +466,9 @@ export async function processURLs( (error?.name === 'ParamValidationError' && error.message?.includes('Domain')) || (error?.name === 'AssertionFailureError' && error.message?.includes('resolve host name')) || error?.message?.includes("Couldn't resolve host name") || - error?.message?.includes("could not be resolved") + error?.message?.includes("could not be resolved") || + error?.message?.includes("ERR_CERT_COMMON_NAME_INVALID") || + error?.message?.includes("ERR_CONNECTION_REFUSED") ) { let hostname = ''; try {