mirror of
https://github.com/caddyserver/caddy.git
synced 2025-02-08 12:50:46 +08:00
Disable tls if the port is http
This commit is contained in:
parent
2dbd14b6dc
commit
68793ffe13
|
@ -3,7 +3,7 @@ package setup
|
||||||
import "github.com/mholt/caddy/middleware"
|
import "github.com/mholt/caddy/middleware"
|
||||||
|
|
||||||
func TLS(c *Controller) (middleware.Middleware, error) {
|
func TLS(c *Controller) (middleware.Middleware, error) {
|
||||||
c.TLS.Enabled = true
|
c.TLS.Enabled = c.Port != "http"
|
||||||
|
|
||||||
for c.Next() {
|
for c.Next() {
|
||||||
if !c.NextArg() {
|
if !c.NextArg() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user