Disable tls if the port is http

This commit is contained in:
Nimi Wariboko Jr 2015-05-04 22:26:28 -07:00
parent 2dbd14b6dc
commit 68793ffe13

View file

@ -3,7 +3,7 @@ package setup
import "github.com/mholt/caddy/middleware"
func TLS(c *Controller) (middleware.Middleware, error) {
c.TLS.Enabled = true
c.TLS.Enabled = c.Port != "http"
for c.Next() {
if !c.NextArg() {