From 749d2e3277a82a9587241d56cac84c4dd5f7eec9 Mon Sep 17 00:00:00 2001 From: Dominik Date: Mon, 28 Oct 2024 23:23:40 +0100 Subject: [PATCH] do not verify developer.riotgames.com cert due to chain issue --- StaticData.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/StaticData.ts b/StaticData.ts index 6e57ca1..452f452 100644 --- a/StaticData.ts +++ b/StaticData.ts @@ -1,5 +1,6 @@ import type { PluginContext } from '@rcv-prod-toolkit/types' import axios from 'axios' +import { Agent } from 'https' import { createWriteStream, createReadStream, existsSync } from 'fs' import { stat, mkdir, writeFile } from 'fs/promises' import { copy, remove } from 'fs-extra' @@ -312,7 +313,9 @@ export default class StaticData { const filePath = join(base, `${name}.json`) const uri = `https://static.developer.riotgames.com/docs/lol/${name}.json` - const res = await axios.get(uri) + const res = await axios.get(uri, { + httpsAgent: new Agent({ rejectUnauthorized: false }) + }) const data = res.data if (res.status !== 200) {