use https-redirect as default app for httpServer
This commit is contained in:
		
							parent
							
								
									1eba51ea22
								
							
						
					
					
						commit
						37c3aee99f
					
				| @ -23,6 +23,9 @@ Servers.create = function(greenlock) { | |||||||
|             return _httpServer; |             return _httpServer; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         if (!defaultApp) { | ||||||
|  |             defaultApp = require("redirect-https")(); | ||||||
|  |         } | ||||||
|         _httpServer = http.createServer(HttpMiddleware.create(greenlock, defaultApp)); |         _httpServer = http.createServer(HttpMiddleware.create(greenlock, defaultApp)); | ||||||
|         _httpServer.once("error", startError); |         _httpServer.once("error", startError); | ||||||
| 
 | 
 | ||||||
| @ -89,7 +92,7 @@ Servers.create = function(greenlock) { | |||||||
| 
 | 
 | ||||||
|             var id = cluster.isWorker && cluster.worker.id; |             var id = cluster.isWorker && cluster.worker.id; | ||||||
|             var idstr = (id && "#" + id + " ") || ""; |             var idstr = (id && "#" + id + " ") || ""; | ||||||
|             var plainServer = servers.httpServer(require("redirect-https")()); |             var plainServer = servers.httpServer(); | ||||||
|             var plainAddr = "0.0.0.0"; |             var plainAddr = "0.0.0.0"; | ||||||
|             var plainPort = 80; |             var plainPort = 80; | ||||||
|             plainServer.listen(plainPort, plainAddr, function() { |             plainServer.listen(plainPort, plainAddr, function() { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user