Skip to content

Commit

Permalink
fix panic error when vhost_http_port is not set but there is a http
Browse files Browse the repository at this point in the history
proxy, fix #776
  • Loading branch information
fatedier committed May 17, 2018
1 parent 3726f99 commit ad1e32f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion models/config/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ func (cfg *HttpProxyConf) CheckForCli() (err error) {

func (cfg *HttpProxyConf) CheckForSvr() (err error) {
if vhostHttpPort == 0 {
err = fmt.Errorf("type [http] not support when vhost_http_port is not set")
return fmt.Errorf("type [http] not support when vhost_http_port is not set")
}
if err = cfg.DomainConf.checkForSvr(); err != nil {
err = fmt.Errorf("proxy [%s] domain conf check error: %v", cfg.ProxyName, err)
Expand Down
1 change: 0 additions & 1 deletion utils/vhost/newhttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func getHostFromAddr(addr string) (host string) {

type HttpReverseProxy struct {
proxy *ReverseProxy
tr *http.Transport

vhostRouter *VhostRouters

Expand Down

0 comments on commit ad1e32f

Please sign in to comment.