add statusCode 302 to redirect
This commit is contained in:
parent
8f15f922d5
commit
e2d9b8e261
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue