From 474f9766d88d00cfadbb621f1fdc7912bd74315f Mon Sep 17 00:00:00 2001 From: tigerbot Date: Tue, 16 May 2017 13:11:27 -0600 Subject: [PATCH] made `status` optional for redirection --- lib/modules/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/http.js b/lib/modules/http.js index e4db50a..8a4da01 100644 --- a/lib/modules/http.js +++ b/lib/modules/http.js @@ -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(); }; }