master
TJ Holowaychuk 2014-04-12 10:59:04 -07:00
parent 8a50594858
commit bb0a0b3659
1 changed files with 3 additions and 0 deletions

View File

@ -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