From 60f14bb2f393a9500cc623f1c5c18fc268beb0ae Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 12 Dec 2019 21:16:05 +0100 Subject: [PATCH] don't save images with full URL, just path is enough (#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- back-end/services/dapp-image-service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back-end/services/dapp-image-service.js b/back-end/services/dapp-image-service.js index 11dc671..cf2c857 100644 --- a/back-end/services/dapp-image-service.js +++ b/back-end/services/dapp-image-service.js @@ -24,7 +24,7 @@ class DAppImageService { } const buildImageUrl = function (req, imageHash) { - return `${req.protocol}://${req.headers.host}${req.originalUrl}/image/${imageHash}`; + return `/metadata/image/${imageHash}`; } module.exports = DAppImageService;