From 26534377bb3600bc8b5f19e9ea14b1d3226e8962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl?= Date: Tue, 1 Oct 2024 10:06:20 +0200 Subject: [PATCH] default https --- controllers/file.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/file.controller.js b/controllers/file.controller.js index 08b3b94..20b2a2c 100644 --- a/controllers/file.controller.js +++ b/controllers/file.controller.js @@ -36,7 +36,7 @@ if (storageMode === "local") { const uploadFile = (req, res) => { storageEngine.writeFile(req, res, () => { const fileHostDomain = - process.env.FILEHOST_DOMAIN || `${req.protocol}://${req.get("host")}`; + process.env.FILEHOST_DOMAIN || `https://${req.get("host")}`; res.status(200).json({ message: "File uploaded successfully", url: `${fileHostDomain}/u/${req.filePath}`,