subdomain: fix a bug that subdomain is not correct for https, close #194

This commit is contained in:
fatedier
2016-12-25 14:15:34 +08:00
parent 6a6ccc5302
commit a56f068f8c
2 changed files with 10 additions and 0 deletions

View File

@@ -184,6 +184,13 @@ func (p *ProxyServer) Start(c *conn.Conn) (err error) {
}
p.listeners = append(p.listeners, l)
}
if p.SubDomain != "" {
l, err := VhostHttpsMuxer.Listen(p.SubDomain, "", p.HostHeaderRewrite, p.HttpUserName, p.HttpPassWord)
if err != nil {
return err
}
p.listeners = append(p.listeners, l)
}
}
p.Lock()