made `status` optional for redirection

This commit is contained in:
tigerbot 2017-05-16 13:11:27 -06:00
parent d16f857fca
commit 474f9766d8
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ module.exports.create = function (deps, conf, greenlockMiddleware) {
match.slice(1).forEach(function (globMatch, index) {
to = to.replace(':'+(index+1), globMatch);
});
res.writeHead(mod.status, { 'Location': to });
res.writeHead(mod.status || 301, { 'Location': to });
res.end();
};
}