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:
parent
ad057ab873
commit
0970c058f7
1 changed files with 2 additions and 7 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue