Skip to content

Commit ab709c0

Browse files
modufy accept header
1 parent 1738b47 commit ab709c0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/libraries/Downloader.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ function handleTarExtraction(filepath: string, extractedPath: string): Promise<v
2222
}
2323

2424
function getFileDownloadURLRedirect(url: string): Promise<string> {
25+
const options: https.RequestOptions = {
26+
headers: {
27+
'accept': '*/*'
28+
}
29+
}
30+
2531
return new Promise((resolve, reject) => {
26-
const request = https.get(url, response => {
32+
const request = https.get(url, options, response => {
2733
console.log('Headers:', response.headers)
2834
const statusCode = response.statusCode
2935
const location = response.headers.location

0 commit comments

Comments
 (0)