Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not verify developer.riotgames.com cert due to chain issue #79

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion StaticData.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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) {
Expand Down