mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 05:25:15 +01:00 
			
		
		
		
	Use certmanager provided TLSConfig for LetsEncrypt (#7229)
This commit is contained in:
		
							parent
							
								
									1e8a616426
								
							
						
					
					
						commit
						eaa3a1db4e
					
				@ -5,7 +5,6 @@
 | 
			
		||||
package cmd
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"crypto/tls"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"net"
 | 
			
		||||
	"net/http"
 | 
			
		||||
@ -84,9 +83,7 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler)
 | 
			
		||||
	server := &http.Server{
 | 
			
		||||
		Addr:      listenAddr,
 | 
			
		||||
		Handler:   m,
 | 
			
		||||
		TLSConfig: &tls.Config{
 | 
			
		||||
			GetCertificate: certManager.GetCertificate,
 | 
			
		||||
		},
 | 
			
		||||
		TLSConfig: certManager.TLSConfig(),
 | 
			
		||||
	}
 | 
			
		||||
	return server.ListenAndServeTLS("", "")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user