Commit dd91812b authored by Matthew Holt's avatar Matthew Holt

Merge branch 'configfix' into letsencrypt

parents 0a1e472f 10619f06
......@@ -2,6 +2,7 @@ package setup
import (
"crypto/tls"
"log"
"strings"
"github.com/mholt/caddy/middleware"
......@@ -12,6 +13,12 @@ func TLS(c *Controller) (middleware.Middleware, error) {
c.TLS.Enabled = true
}
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)
}
for c.Next() {
args := c.RemainingArgs()
switch len(args) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment