Permalink
Browse files

HTTPS settings are applied for letsencrypt as well.

  • Loading branch information...
tamasd committed Oct 21, 2016
1 parent a5a856d commit e832ee3a8aa6e9d3887d002a6c4c982340593551
Showing with 3 additions and 4 deletions.
  1. +3 −4 server.go
View
@@ -290,10 +290,6 @@ func (s *WalkhubServer) Start(addr string, certfile string, keyfile string) erro
s.GetF(path, handleIndex)
}
if host := s.cfg.GetString("letsencrypthost"); host != "" {
s.EnableLetsEncrypt("", host)
}
ec := ab.NewEntityController(s.GetDBConnection())
ec.
Add(&User{}, userEntityDelegate{}).
@@ -373,6 +369,9 @@ func (s *WalkhubServer) Start(addr string, certfile string, keyfile string) erro
if s.TLSConfig.ServerName == "" {
s.TLSConfig.ServerName = s.BaseURL
}
} else if host := s.cfg.GetString("letsencrypthost"); host != "" {
s.setupHTTPS()
s.EnableLetsEncrypt("", host)
}
return s.StartHTTPS(addr, certfile, keyfile)

0 comments on commit e832ee3

Please sign in to comment.