Add support for Let's Encrypt http-01 challenge
This commit is contained in:
parent
3884a33b36
commit
12ff562d31
32 changed files with 2049 additions and 293 deletions
|
@ -40,6 +40,13 @@ func newServer(cfg *config.Config, store *storage.Storage, pool *scheduler.Worke
|
|||
HostPolicy: autocert.HostWhitelist(certDomain),
|
||||
}
|
||||
|
||||
// Handle http-01 challenge.
|
||||
s := &http.Server{
|
||||
Handler: certManager.HTTPHandler(nil),
|
||||
Addr: ":http",
|
||||
}
|
||||
go s.ListenAndServe()
|
||||
|
||||
go func() {
|
||||
logger.Info(`Listening on "%s" by using auto-configured certificate for "%s"`, server.Addr, certDomain)
|
||||
logger.Fatal(server.Serve(certManager.Listener()).Error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue