mirror of
				https://github.com/therootcompany/greenlock-express.js.git
				synced 2025-11-03 21:42:47 +00:00 
			
		
		
		
	Merge branch 'master' of github.com:Daplie/letsencrypt-express
This commit is contained in:
		
						commit
						275d1d29e3
					
				@ -17,6 +17,8 @@ Email me coolaj86@gmail.com if you want to help.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# LetsEncrypt Express
 | 
					# LetsEncrypt Express
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[](https://gitter.im/Daplie/letsencrypt-express?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.
 | 
					Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Automatic Registration via SNI (`httpsOptions.SNICallback`)
 | 
					* Automatic Registration via SNI (`httpsOptions.SNICallback`)
 | 
				
			||||||
@ -131,7 +133,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.statusCode = 302; // use 307 if you want to redirect requests with POST, DELETE or PUT action.
 | 
				
			||||||
    res.end('<!-- Hello Developer Person! Please use HTTPS instead -->');
 | 
					    res.end('<!-- Hello Developer Person! Please use HTTPS instead -->');
 | 
				
			||||||
  })).listen(80);
 | 
					  })).listen(80);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user