Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 1a5070e

Browse files
authored
fix axios bug to support https proxy (#1186)
1 parent 393d33d commit 1a5070e

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 16 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/lu/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"@types/node-fetch": "~2.5.5",
3737
"antlr4": "~4.8.0",
3838
"axios": "~0.21.1",
39+
"axios-https-proxy": "^0.1.1",
3940
"chalk": "2.4.1",
4041
"console-stream": "^0.1.1",
4142
"deep-equal": "^1.0.1",

packages/lu/src/parser/lubuild/http-request.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
* Licensed under the MIT License.
44
*/
55

6-
import axios from 'axios'
6+
const axios = require('axios')
7+
const axiosHttpsProxy = require('axios-https-proxy')
8+
axios.interceptors.request.use(axiosHttpsProxy)
79

810
export default {
911
async get(

packages/lu/src/parser/qnabuild/serviceBase.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
* Licensed under the MIT License.
44
*/
55

6-
const axios = require('axios');
6+
const axios = require('axios')
7+
const axiosHttpsProxy = require('axios-https-proxy')
78
const os = require('os')
89
const packageJSON = require('./../../../package')
10+
axios.interceptors.request.use(axiosHttpsProxy)
911

1012
/**
1113
* Base class for all services

0 commit comments

Comments
 (0)