diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-05-22 14:14:26 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-05-22 14:14:26 -0600 |
commit | 869fbac632bc098f8d40fd7b43790fadce84ed1a (patch) | |
tree | 45400f5e541aec8b7786c65638ef44f9b678dd14 /modules/caddyhttp/caddyhttp.go | |
parent | 284fb3a98cae2e6e6ca79327988230a3a916996a (diff) |
Don't use auto HTTPS for servers with only HTTP port listeners
Diffstat (limited to 'modules/caddyhttp/caddyhttp.go')
-rw-r--r-- | modules/caddyhttp/caddyhttp.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index 1ff2cbc..0fde218 100644 --- a/modules/caddyhttp/caddyhttp.go +++ b/modules/caddyhttp/caddyhttp.go @@ -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 { |