Skip to content

Commit

Permalink
Fixes unable to verify the first certificate error
Browse files Browse the repository at this point in the history
Known issue: `Protocol "http:" not supported. Expected "https:"`.
More details: axios/axios#1904 (comment)
  • Loading branch information
freearhey committed Aug 17, 2019
1 parent 04baeb9 commit f5ed8af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Expand Up @@ -3,6 +3,7 @@
const helper = require('./helper')
const fs = require("fs")
const axios = require('axios')
const https = require('https')
const argv = require('commander')
const ProgressBar = require('progress')
const dateFormat = require('dateformat')
Expand Down Expand Up @@ -42,7 +43,10 @@ fs.writeFileSync(duplicatesFile, '#EXTM3U\n')
fs.writeFileSync(radioFile, '#EXTM3U\n')

let instance = axios.create({
timeout
timeout,
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
})
instance.defaults.headers.common["User-Agent"] = "VLC/2.2.4 LibVLC/2.2.4"

Expand Down

0 comments on commit f5ed8af

Please sign in to comment.