Merge branch 'master' of github.com:Daplie/letsencrypt-express

This commit is contained in:
AJ ONeal 2016-04-18 16:32:25 +00:00
commit 7ae011ec03
1 changed files with 1 additions and 0 deletions

View File

@ -108,6 +108,7 @@ var https = require('spdy');
function redirectHttp() { function redirectHttp() {
http.createServer(LEX.createAcmeResponder(lex, function redirectHttps(req, res) { http.createServer(LEX.createAcmeResponder(lex, function redirectHttps(req, res) {
res.setHeader('Location', 'https://' + req.headers.host + req.url); res.setHeader('Location', 'https://' + req.headers.host + req.url);
res.statusCode = 302;
res.end('<!-- Hello Developer Person! Please use HTTPS instead -->'); res.end('<!-- Hello Developer Person! Please use HTTPS instead -->');
})).listen(80); })).listen(80);
} }