From 9bbf43c590ad12fded733d4f21ff6f4ecde83938 Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 2 Apr 2021 14:34:16 +0200 Subject: [PATCH] Replace http with https --- modules/item/back/methods/item-image-queue/downloadImages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/item/back/methods/item-image-queue/downloadImages.js b/modules/item/back/methods/item-image-queue/downloadImages.js index 2d2e8af91..05b223598 100644 --- a/modules/item/back/methods/item-image-queue/downloadImages.js +++ b/modules/item/back/methods/item-image-queue/downloadImages.js @@ -50,8 +50,9 @@ module.exports = Self => { const fileName = srcFile.replace(/\.|\/|:|\?|\\|=|%/g, ''); const file = `${fileName}.png`; const filePath = path.join(tempPath, file); + const imageUrl = image.url.replace('http://', 'https://'); - https.get(image.url, async response => { + https.get(imageUrl, async response => { if (response.statusCode != 200) { const error = new Error(`Could not download the image. Status code ${response.statusCode}`);