Commit accb3e61 authored by Nimi Wariboko Jr's avatar Nimi Wariboko Jr

Add warning message when tls is disabled when its used on http

parent 68793ffe
package setup
import "github.com/mholt/caddy/middleware"
import (
"github.com/mholt/caddy/middleware"
"log"
)
func TLS(c *Controller) (middleware.Middleware, error) {
c.TLS.Enabled = c.Port != "http"
c.TLS.Enabled = true
if c.Port == "http" {
c.TLS.Enabled = false
log.Printf("Warning: TLS was disabled on host http://%s."+
" Make sure you are specifying https://%s in your config (if you haven't already)."+
" If you meant to serve tls on port 80,"+
" specify port 80 in your config (http://%s:80).", c.Host, c.Host, c.Host)
}
for c.Next() {
if !c.NextArg() {
......
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