From d5457ddd9ddcc59de02a3f143aff2aa808d50fab Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Sat, 5 Aug 2017 21:37:51 +0100 Subject: [PATCH] Re work --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 383d5c3..c949f76 100644 --- a/app.js +++ b/app.js @@ -80,7 +80,7 @@ app.get('/:encoded_id', function(req, res){ Url.findOneAndUpdate({_id: id}, {$inc:{visits:1}}, function (err, doc){ if (doc) { logger.debug('doc', doc); - res.redirect(doc.long_url); + res.redirect(307, doc.long_url); } else { res.redirect(config.webhost); }