-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
beause axios lack of proxy support, like:
axios/axios#6725
If I setup envirument variable:
https_proxy=http://192.168.1.1:8080
The database download process will fail in axios.
a simple fix suggest can be :
[script/updatedb.mjs]
import {update} from '../src/db.mjs'
import axios from "axios";
import {HttpsProxyAgent} from "https-proxy-agent";
if(process.env['https_proxy']){
let agent = new HttpsProxyAgent(process.env['https_proxy']);
axios.defaults.httpsAgent = agent;
delete process.env['https_proxy'];
}
update()
sapics
Metadata
Metadata
Assignees
Labels
No labels