This commit is contained in:
TJ Holowaychuk 2014-04-12 10:59:04 -07:00
parent 8a50594858
commit bb0a0b3659

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