From 0970c058f7a7aedb476120a288214a35c396d1a5 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 2 Nov 2015 20:54:38 -0700 Subject: [PATCH] tls: Repair from messy merge --- caddy/setup/tls.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/caddy/setup/tls.go b/caddy/setup/tls.go index 1345c11c..7519202b 100644 --- a/caddy/setup/tls.go +++ b/caddy/setup/tls.go @@ -9,17 +9,12 @@ import ( ) func TLS(c *Controller) (middleware.Middleware, error) { - if c.Port != "http" { - c.TLS.Enabled = true - } else { - log.Printf("Warning: TLS disabled for %s://%s. To force TLS over the plaintext HTTP port, "+ - "specify port 80 explicitly (https://%s:80).", c.Port, c.Host, c.Host) - } - if c.Port == "http" { c.TLS.Enabled = false log.Printf("Warning: TLS disabled for %s://%s. To force TLS over the plaintext HTTP port, "+ "specify port 80 explicitly (https://%s:80).", c.Port, c.Host, c.Host) + } else { + c.TLS.Enabled = true // they had a tls directive, so assume it's on unless we confirm otherwise later } for c.Next() {