• Matthew Holt's avatar
    httpserver: Raise error when adjusted site addresses clash at startup · be96cc0e
    Matthew Holt authored
    See discussion on #2015 for how this situation was discovered. For a
    Caddyfile like this:
    
    	localhost {
    		...
    	}
    	:2015 {
    		...
    	}
    
    Running Caddy like this:
    
    	caddy -host localhost
    
    Produces two sites both defined as `localhost:2015` because the flag
    changes the default host value to be `localhost`. This should be an
    error since the sites are not distinct and it is confusing. It can also
    cause issues with TLS handshakes loading the wrong cert, as the linked
    discussion shows.
    be96cc0e
plugin.go 18.5 KB