From 9f210c1d0393349c7608539c94360272afaadeba Mon Sep 17 00:00:00 2001 From: Shendy Kurnia Date: Mon, 7 Mar 2016 17:49:11 +0700 Subject: [PATCH] fix bug 'Go to image' link http://// --- controllers/main.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/main.coffee b/controllers/main.coffee index 219da31..57abd15 100644 --- a/controllers/main.coffee +++ b/controllers/main.coffee @@ -112,7 +112,7 @@ post.upload = (req, res) -> return res.send "File too large", 500 fileName = helpers.generateFileName(file.type.replace "image/", "") - domain = if req.app.get "localrun" then req.headers.host else req.app.get "domain" + domain = if req.app.get "localrun" then "#{req.protocol}://#{req.headers.host}" else req.app.get "domain" longURL = "#{domain}/#{fileName}" sourcePath = file.path