|
@@ -54,14 +54,12 @@ export class PluginService {
|
|
|
const unzippedPath = path.join(pluginStoringPath, ghOrganizationName);
|
|
const unzippedPath = path.join(pluginStoringPath, ghOrganizationName);
|
|
|
|
|
|
|
|
const downloadFile = async(requestUrl: string, filePath: string) => {
|
|
const downloadFile = async(requestUrl: string, filePath: string) => {
|
|
|
- // Avoid GitHub Code scanning / CodeQL
|
|
|
|
|
- const deepCopyUrl = requestUrl.slice();
|
|
|
|
|
-
|
|
|
|
|
return new Promise<void>((resolve, reject) => {
|
|
return new Promise<void>((resolve, reject) => {
|
|
|
axios({
|
|
axios({
|
|
|
method: 'GET',
|
|
method: 'GET',
|
|
|
- url: deepCopyUrl,
|
|
|
|
|
- httpAgent: useAgent(deepCopyUrl, { stopPortScanningByUrlRedirection: true }),
|
|
|
|
|
|
|
+ url: requestUrl,
|
|
|
|
|
+ httpAgent: useAgent(requestUrl, { stopPortScanningByUrlRedirection: true }),
|
|
|
|
|
+ httpsAgent: useAgent(requestUrl, { stopPortScanningByUrlRedirection: true }),
|
|
|
responseType: 'stream',
|
|
responseType: 'stream',
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|