Don't use auto HTTPS for servers with only HTTP port listeners

This commit is contained in:
Matthew Holt
2019-05-22 14:14:26 -06:00
parent 284fb3a98c
commit 869fbac632
2 changed files with 21 additions and 0 deletions

View File

@ -188,6 +188,11 @@ func (app *App) automaticHTTPS() error {
continue
}
// skip if all listeners use the HTTP port
if !srv.listenersUseAnyPortOtherThan(app.HTTPPort) {
continue
}
// find all qualifying domain names, de-duplicated
domainSet := make(map[string]struct{})
for _, route := range srv.Routes {