0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

tls: Repair from messy merge

This commit is contained in:
Matthew Holt 2015-11-02 20:54:38 -07:00
parent ad057ab873
commit 0970c058f7

View file

@ -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() {