From bb0a0b3659aec289af52dceef50289e89341b992 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sat, 12 Apr 2014 10:59:04 -0700 Subject: [PATCH] ocd --- lib/response.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/response.js b/lib/response.js index dfb495f..aa42306 100644 --- a/lib/response.js +++ b/lib/response.js @@ -210,8 +210,11 @@ module.exports = { */ redirect: function(url, alt){ + // location if ('back' == url) url = this.ctx.get('Referrer') || alt || '/'; this.set('Location', url); + + // status if (!status.redirect[this.status]) this.status = 302; // html