From d28b746d90843f52470f72ca4748113194551785 Mon Sep 17 00:00:00 2001 From: Radian Date: Sat, 16 Jul 2016 15:25:31 +0800 Subject: [PATCH] redirect all http request actions to https http://stackoverflow.com/questions/2068418/whats-the-difference-between-a-302-and-a-307-redirect --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7816104..08fee67 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ var https = require('spdy'); function redirectHttp() { http.createServer(LEX.createAcmeResponder(lex, function redirectHttps(req, res) { res.setHeader('Location', 'https://' + req.headers.host + req.url); - res.statusCode = 302; + res.statusCode = 302; // use 307 if you want to redirect requests with POST, DELETE or PUT action. res.end(''); })).listen(80); }