Skip to content

Commit 3b5e74c

Browse files
committed
Workaround imgur api only provide non-https image url which will cause mix-content warning in browsers
1 parent 7aa21c8 commit 3b5e74c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ app.post('/uploadimage', function (req, res) {
407407
if (config.debug)
408408
logger.info('SERVER uploadimage success: ' + JSON.stringify(json));
409409
res.send({
410-
link: json.data.link
410+
link: json.data.link.replace(/^http:\/\//i, 'https://')
411411
});
412412
})
413413
.catch(function (err) {

0 commit comments

Comments
 (0)