From c8f97ef386546c3a4261ee9e8d4dfb9a623b9668 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 5 Oct 2022 17:58:39 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5=D0=BC=D1=8B=20'unable=20to?= =?UTF-8?q?=20verify=20the=20first=20certificate'=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BD=D0=B5=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D1=85=20=D1=81?= =?UTF-8?q?=D0=B0=D0=B9=D1=82=D0=BE=D0=B2=20=D1=81=20=D0=B2=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D0=B4=D0=BD=D1=8B=D0=BC=20=D1=81=D0=B5=D1=80=D1=82=D0=B8?= =?UTF-8?q?=D1=84=D0=B8=D0=BA=D0=B0=D1=82=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/FileDownloader.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/core/FileDownloader.js b/server/core/FileDownloader.js index 7061532a..5f86e5ab 100644 --- a/server/core/FileDownloader.js +++ b/server/core/FileDownloader.js @@ -1,3 +1,4 @@ +const https = require('https'); const axios = require('axios'); const utils = require('./utils'); @@ -16,6 +17,9 @@ class FileDownloader { 'user-agent': userAgent, timeout: 300*1000, }, + httpsAgent: new https.Agent({ + rejectUnauthorized: false // решение проблемы 'unable to verify the first certificate' для некоторых сайтов с валидным сертификатом + }), responseType: 'stream', };