Misc. changes: {hostonly} placeholder, self_signed port fix

This commit is contained in:
Matthew Holt
2016-07-02 14:10:57 -06:00
parent 32329a473d
commit 227664336e
4 changed files with 11 additions and 4 deletions

View File

@@ -138,7 +138,7 @@ func (h *httpContext) MakeServers() ([]caddy.Server, error) {
// is incorrect for this site.
cfg.Addr.Scheme = "https"
}
if cfg.Addr.Port == "" && (!cfg.TLS.Manual || cfg.TLS.OnDemand) {
if cfg.Addr.Port == "" && ((!cfg.TLS.Manual && !cfg.TLS.SelfSigned) || cfg.TLS.OnDemand) {
// this is vital, otherwise the function call below that
// sets the listener address will use the default port
// instead of 443 because it doesn't know about TLS.