From 3b5e74c9c4ac155a473f3284f0ca4180c834cabc Mon Sep 17 00:00:00 2001 From: "Cheng-Han, Wu" Date: Sun, 8 May 2016 01:54:57 +0800 Subject: [PATCH] Workaround imgur api only provide non-https image url which will cause mix-content warning in browsers --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index b99a8e8..c3c824a 100644 --- a/app.js +++ b/app.js @@ -407,7 +407,7 @@ app.post('/uploadimage', function (req, res) { if (config.debug) logger.info('SERVER uploadimage success: ' + JSON.stringify(json)); res.send({ - link: json.data.link + link: json.data.link.replace(/^http:\/\//i, 'https://') }); }) .catch(function (err) {