mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
Add user agent and log urls on the sync-assets script
This commit is contained in:
parent
6314bc1f54
commit
3b192f6ff5
1 changed files with 2 additions and 2 deletions
|
|
@ -80,9 +80,9 @@ const downloadFile = (filePath, url) => {
|
|||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
https.get(url, (response) => {
|
||||
https.get(url, { headers: { 'user-agent': 'node.js' } }, (response) => {
|
||||
if (response.statusCode < 200 || response.statusCode > 299) {
|
||||
reject(new Error(`HTTP Error ${response.statusCode} while fetching '${filePath}'`));
|
||||
reject(new Error(`HTTP Error ${response.statusCode} while fetching '${url}' (destination '${filePath}')`));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue