From 06e0ce26a92ad971a9b3e9dfc14548554d025969 Mon Sep 17 00:00:00 2001 From: vulet Date: Mon, 9 Aug 2021 17:14:46 +0800 Subject: [PATCH] fix(archive): The latest version of the `matrix-js-sdk` dependency requires a Node version of at least: 12.9. Node 12 introduced TLSv1.3 as default, which `axios` then uses. This is causing the archive command to break, so the particular command will continue forward with TLSv1.2 for now. --- commands/archive.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/archive.js b/commands/archive.js index a8802c3..c91e725 100644 --- a/commands/archive.js +++ b/commands/archive.js @@ -1,5 +1,6 @@ const { JSDOM } = require('jsdom'); const qs = require('qs'); +const https = require('https'); const sleep = ms => new Promise(r => setTimeout(r, ms)); @@ -35,6 +36,7 @@ const arc3Str = str => `Timed out ${str}`; const run = async (roomId, userInput, rearchive) => { const instance = axios.create({ baseURL: `https://${config.archive.domain}`, + httpsAgent: https.Agent({ maxVersion: "TLSv1.2"}), headers: headers(config.archive), transformResponse: [], timeout: 10 * 1000